Feature/trax
Add Trax support to esp-idf. OpenOCD already has trax support, this allows an esp-idf program to also trigger this when needed. Also included: some more logic to correctly reserve memory blocks for Trax.
See merge request !73
Some small fixes
- Kill unused uxReturn in task.c, https://github.com/espressif/esp-idf/issues/48
- Line end conversion in gpio.c
- Move heap_alloc_caps.h so components can also use it
See merge request !135
lwip/esp32: support iperf
1. Add _exit() definition in syscalls.c
2. Fix a bug in sockets.c on which iperf depends
I'm now investigating performance of esp32, need iperf to be merged in to master branch for convience
See merge request !136
1. add libphy.a librtc.a, but store in bt submodule, if someone use them, please copy to esp32/lib/ instead the origin one
2. add 07_blufi demo
3. change esp32/Kconfig to allow bt/wifi coexist
esp32: Bootloader wake deep sleep stub
App can contain a stub program resident in RTC fast memory. Bootloader
will load the stub on initial boot. If the device wakes from deep sleep,
the stub is run immediately (before any other data is loaded, etc.)
To implement a custom wake stub, implement a function in your program:
```
void RTC_IRAM_ATTR esp_wake_deep_sleep(void)
{
esp_default_wake_deep_sleep();
// other wake logic
}
```
... and it will replace the default implementation.
See merge request !78
We reserve 4KB Slow RTC memory to save RF calibation result and BT NVS data.
If not all these Slow RTC momory Blocks are used, we will open the other parts.
App can contain a stub program resident in RTC fast memory. Bootloader
will load the stub on initial boot. If the device wakes from deep sleep,
the stub is run immediately (before any other data is loaded, etc.)
To implement a custom wake stub, implement a function in your program:
```
void RTC_IRAM_ATTR esp_wake_deep_sleep(void)
{
esp_default_wake_deep_sleep();
// other wake logic
}
```
... and it will replace the default implementation.
* master:
app_main: Return type to void
wifi: move type definitions into separate header file
wifi: use default esp_event_send handler in WIFI_INIT_CONFIG_DEFAULT
nvs: Remove flash layout arguments from nvs_init()
Add contributor agreement, update CONTRIBUTING file
Update http_request & https_request examples for new startup flow
Add very simple "hello world" & "blink" examples
Build examples out-of-tree as part of CI process
Examples: Use event groups for waiting until WiFi is associated & ESP has IP
BT example: Enable BT stack in config by default
BT: Relink component on new BT library, auto-initialise submodule if missing
Documentation: Add contributor guide, expand README & add an examples README
Update gitignore for examples
examples: Add https_request example
mbedtls: Add some initial menuconfig options
examples: HTTP request example
component/esp32: udpate wifi lib
component/esp32: modify bool argument name from enable to en
component/esp32: adjust some APIs
esptool: Bump upstream revision
* master: (32 commits)
components/nghttp: rename Makefile to component.mk
components/nghttp: add HTTP2.0 protocol feature
compoenents/esp32: don't alias start_cpu1 to start_cpu0_default
components/freertos: fix a bug with an uninitialised return value
Change application entry point name back to app_main
gitlab-ci: build SSC with matching branch name, if available
components/spi_flash: remove stray level of indentation
components/nvs: fix broken sentences in comment blocks
components/esp32: fix renaming of esp_event_set_cb, minor clean up
components/esp32: remove "_user" part from entry points, weaken start_cpu0/1
Fix a spelling mistake in panic message, add carriage return to stack canary message
components/lwip,esp32: fixes for C++
components/bt: fix compilation, remove ./ from makefile
components/esp32: clarify type of queue in wifi_init_config_t, add default init macro
components/esp32: add ESP_ERROR_CHECK
Event handling refactoring
clean up warnings
components/esp32,bt: fix typos in comments
Startup flow refactoring
Roll back submodule version
...
While this may reduce esp_wifi.h file readability for people who don't have a "go to definition" function in their editors, this is needed to decouple esp_wifi and esp_event headers, and possibly other headers which may use wifi types in the future.
* master:
components/spi_flash: remove stray level of indentation
components/nvs: fix broken sentences in comment blocks
Roll back submodule version
Spinlocks already come initialized. Remove the code that would essentially re-initialize them at runtime
Remove all references to prvLockQueue / prvUnlockQueue
components/esp32: clean up unused function warnings in single core mode
clean up warnings
components/nvs: fix build, use log library instead of printf
components/spi_flash: add flash operation counters option to Kconfig
components/nvs: add erase function
components/nvs: fix formatting
components/nvs: batch writes when possible
components/spi_flash: add performance counters
components/nvs: maintain item hash list at page level
components/nvs: avoid reading just-erased page
# Conflicts:
# components/esp32/cpu_start.c
# components/esp32/event_default_handlers.c
Clean up warnings and remove unused parts of FreeRTOS
For third party components (lwip and expat), compilation flags are adjusted to silence existing warnings (i have manually checked that all warnings are benign).
In components/esp32, replaced use of WIFI_DEBUG with ESP_LOG functions.
Additionally prvLockQueue/prvUnlockQueue have been removed, dragging some other bits of FreeRTOS along.
Original issue: https://github.com/espressif/esp-idf/issues/18
See merge request !111
- put contents of a few headers into c++ guard blocks
- fix off-by-one error in do_global_ctors
- remove system_init from startup code (should be called from main)
This change separates definitions in esp_event.h and functions in event.c into several parts:
- event structure definitions (esp_event.h)
- default implementations of event handlers (event_default_handlers.c)
- default implementation of event loop (event_loop.c, esp_event_loop.h)
Purpose of this change is to allow applications choose their own poison:
- full control of event loop at the expense of more bootstrap code
- pre-defined event task firing event callbacks, but less code in app_main.c
For third party components (lwip and expat), compilation flags are adjusted to silence existing warnings (i have manually checked that all warnings are benign).
In components/esp32, replaced use of WIFI_DEBUG with ESP_LOG functions.
Only remaining warning is in FreeRTOS queue.c, and it may be a useful one.
This change removes implicit WiFi/BT initialization from startup code.
"main" task is started once essential part of startup code is complete.
This task calls application-provided "int main(void)" function, which can call WiFi/BT init functions if necessary.
For third party components (lwip and expat), compilation flags are adjusted to silence existing warnings (i have manually checked that all warnings are benign).
In components/esp32, replaced use of WIFI_DEBUG with ESP_LOG functions.
Only remaining warning is in FreeRTOS queue.c, and it may be a useful one.
* master: (57 commits)
components/lwip: fix grammar
components/lwip: make SO_REUSE configurable via menuconfig
bootloader: remove trailing newlines from log messages
components/freertos: override per-task __cleanup handler to close stdin, stdout, stderr
components/esp32: move peripheral symbols to separate ld script
components/log: regroup macros for better readability
gitlab-ci: allow running tests for branches, triggered via API
components/log: fix timestamp calculation
components/log: set default runtime log level to ESP_LOG_VERBOSE
components/log: fix error when using ESP_LOGx from C++ code
components/log: fix bugs, add options to override log level for files, components, and bootloader
fix ledc and spi typo
remove prefix and postfix
Enable SO_REUSEADDR in LWIP
freertos: fix memory debug macro issue Define configENABLE_MEMORY_DEBUG according to CONFIG_ENABLE_MEMORY_DEBUG
peripheral structure headers: move volatile keyword from members to typedef
Adding -fstrict-volatile-bitfields to the CFLAGS/CXXFLAGS. Without this, gcc tries to access bitfields using the smallest possible methods (eg l8i to grab an 8-bit field from a 32-bit). Our hardware does not like that. This flag tells gcc that if a bitfield is volatile, it should always use the type the field is defined at (uint32_t in our case) to size its access to the field. This fixes accessing the hardware through the xxx_struct.h headers.
add peripheral module struct headers
build system docs: Add note about no spaces in component names
Docs: Add note about unusual submodule messages when cloning on Windows
...
# Conflicts:
# components/esp32/cpu_start.c
# components/esp32/include/soc/cpu.h
Add logging library
Logging library, intended to be used across other components.
Uses design similar to Android NDK logging APIs and allows for both compile time and run time filters, similar to logcat.
Also includes cleanup of cpu_startup.c — i was changing some logging output in this file so decided to re-format it and reduce code duplication.
Ref TW6703
See merge request !68
Move CPU region protection setup into soc/cpu.h
change tabs to spaces
remove unused extern declarations
use RTC_WDTCONFIG0 instead of numeric address (still need to fix BB reg)
This also removes logging implementation from bootloader and replaces it
with the one provided by the log component. Some occurrences of printf
and ets_printf have been changed to ESP_LOGx APIs.
Note that with WiFi stack enabled, system_init will reset frequency to 240MHz.
To make this setting useful, esp32-wifi-libs submodule needs to be updated.
Dual core compatible spi flash APIs
Implementation of spi flash APIs which work in dual core mode.
This also includes other changes:
- fixes to FreeRTOS tasks.c made by Jeroen and me — these were originally made to fix issues with high priority tasks seen in WiFi stack, but were required to get stuff in ipc.c working as well
- initial base idea with two high-priority tasks was separated into a separate API — esp_ipc.h. That API allows one to run a function on the other CPU from a high-priority task. Because we don't have preemption across CPUs, this is currently not very fast: it requires on average half a tick until the second CPU switches to the high priority task. Currently that API can be either blocking, or non-blocking with queue length of 1. I haven't yet found a use case for arbitrary sized queue of IPC requests. Anyone who needs that can trivially add that later by replacing a binary semaphore with a generic queue.
With these changes i can run application with WiFi stack and NVS on both cores.
See merge request !25
1. timer reg file for both time group 0 and time group 1, not only timer group 0
2. fix bug that io mux header file mismatch with chip
3. fix bug that some BASE address not correct
4. add some static function to eagle.fpga32.rom.addr.v7.ld
5. add interrupts usage table
6. add some comments for rom code functions
Should protect against concurrent use of hardware crypto primitives,
with good performance.
Not necessary to call esp_aes_acquire_hardware(),
esp_sha_acquire_hardware(), etc when using these APIs. These are
provided for external users calling the hardware crypto hardware
directly, to coexist with this implementation.
Fixes problems with Eclipse trying to build in directories it shouldn't.
This is a breaking change for existing repositories, they need to rename
any component Makefiles to component.mk and rename their references to
$(IDF_PATH)/make/component.mk to $(IDF_PATH)/make/component_common.mk
1. Add the parameter type of api esp_wifi_set_storage.
2. WIFI_STORAGE_RAM means storing profiles in ram. WIFI_STORAGE_FLASH means storing profiles in flash.
The parameter aid followed -a is aid of the connected station. If aid is 0, kick out all of the connected stations.
2. Add block parameter to api esp_wifi_scan_start.
If block is true, the api blocks before scan done or returns directly.
found small mistake in it
we have:
PROVIDE ( ets_aes_crypt = 0x4005c9b8 );
PROVIDE ( ets_aes_disable = 0x4005c8f8 );
PROVIDE ( ets_aes_enable = 0x4005c8cc );
PROVIDE ( ets_aes_set_endian = 0x4005c928 );
PROVIDE ( ets_aes_setkey_dec = 0x4005c994 );
PROVIDE ( ets_aes_setkey_enc = 0x4005c97c );
Signed-off-by: Ivan Grokhotkov <ivan@espressif.com>
2. Add struct station_list into tcpip_adapter layer
3. When ap -L cmd is received, get mac address from mac layer first and then search ip address based on mac address on dhcp layer.
update ld and heap region
Divide origin fpga ld to several lds, choose specific ld for normal/BT/Trace by menuconfig, change iram/dram len in ld to full use hardware ram region.
See merge request !28
Fix dualcore startup
This MR includes:
- a workaround for a hardware bug with cache initialization
- fix of `#if CONFIG_WIFI_ENABLED` block in cpu_start.c for the case when WiFi is disabled.
- removal of miscellaneous delays in cpu_start.c
See merge request !22
This change removes various delays in PRO and APP CPU startup paths.
Also some unused code and ets_printf statements are cleaned up or removed.
2nd CPU now communicates that it has started through a global variable.