liuzhifu [Wed, 24 Aug 2016 08:33:30 +0000 (16:33 +0800)]
components: lwip
Implement lwip per-thread-sem with:
vTaskSetThreadLocalStoragePointerAndDelCallback/pvTaskGetThreadLocalStoragePointer
register sys_thread_tls_free to free per-thread-sem when the thread is terminated.
Also let lwip use index CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX
xiaxiaotian [Tue, 23 Aug 2016 03:22:58 +0000 (11:22 +0800)]
1. Remove ip member of struct station_info
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.
Ivan Grokhotkov [Thu, 25 Aug 2016 03:07:21 +0000 (11:07 +0800)]
Merge branch 'bugfix/dualcore_startup' into 'master'
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
Ivan Grokhotkov [Thu, 25 Aug 2016 02:19:17 +0000 (10:19 +0800)]
Merge branch 'bugfix/dram_attr' into 'master'
fix DRAM_ATTR attribute
Variables marked with DRAM_ATTR were not placed in any specific section and were appended to the last section, causing some errors at binary file generation stage.
This change places contents of .dram1 section into .dram0.data.
Also removes .iram1pro/.iram1app/.dram1pro/.dram1app which weren't used anywhere.
Ivan Grokhotkov [Wed, 24 Aug 2016 12:24:33 +0000 (20:24 +0800)]
Merge branch 'bugfix/bootloader_incremental_build' into 'master'
Make: fix incremental builds, add build tests
Four semi-related build changes in one:
* Add basic tests for make system sanity (can be expanded as we find corner cases)
* Fix incremental building of bootloader when source files change
* Don't regenerate component libraries or re-link the ELF file if nothing changed
* Rename `$(vecho)` to `$(summary)` and add a new `$(details)` macro to echo some helpful build details when V=1.
Jeroen Domburg [Wed, 24 Aug 2016 12:21:52 +0000 (20:21 +0800)]
Merge branch 'feature/openocd-freertos-support_try2' into 'master'
Add symbol needed for OpenOCD to detect FreeRTOS, add feature to break execution, try 2
Add symbol needed for OpenOCD to detect FreeRTOS, add optional feature to break execution when the scheduler is initially started. The workflow is now so that if you start an esp-idf program, you can reset the CPU and end up in a gdb prompt just before all threads start up. In gdb you can then inspect all threads and watch breakpoints. Has the nice side effect that OpenOCD will restore any break/watchpoints that were there before you reset the chip.
This is try 2 because seemingly, someone or something replaced the bit of my brain that is responsible for handling Git with a squeaky toy.
Ivan Grokhotkov [Wed, 24 Aug 2016 08:25:04 +0000 (16:25 +0800)]
components/bootloader: fix enabling cache for APP CPU
This is a workaround for a hardware bug with cache initialization.
Only two lines of code related to DPORT_APP_CACHE_MMU_IA_CLR were added around mmu_init(1); call,
and two lines at the end of comment block.
I reformatted surrounding lines to use spaces for indentation, like the rest of the code in this file does.
Ivan Grokhotkov [Wed, 24 Aug 2016 08:21:28 +0000 (16:21 +0800)]
components/esp32: fix and clean up dual core startup
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.
Jeroen Domburg [Wed, 24 Aug 2016 05:29:06 +0000 (13:29 +0800)]
'Merge branch 'thread_local_storage_delete_callbacks' into 'master'
The thread-local-storage feature in FreeRTOS attaches an application-usable array of pointers to a thread control block. These pointers usually point to a structure the thread allocates. When a thread gets (voluntarily or involuntarily) destroyed, this memory can leak. This merge adds a matching second array of user-settable pointers to destructor routines. As soon as the task gets cleaned up (which happens in the idle thread), the destructors get called and the memory can be freed.
Ivan Grokhotkov [Tue, 23 Aug 2016 15:13:50 +0000 (23:13 +0800)]
Merge branch 'bugfix/ci-menuconfig-noninteractive' into 'master'
Fix for noninteractive builds
This MR fixes the case when new Kconfig configuration options were added
and you run `make menuconfig`. Previously this would first show console
prompt to set values for new options, and then launch menuconfig.
Now this will just launch menuconfig. New items are marked as `(NEW)`.
New target is added, defconfig, which may be useful for non-interactive
environments to set default values for all new configuration options.
Gitlab CI uses `make defconfig` to update sdkconfig in case any new
options were added in ESP-IDF.
Ivan Grokhotkov [Tue, 23 Aug 2016 09:25:32 +0000 (17:25 +0800)]
docs: add linux getting started guide
Currently this is mostly a verbatim copy of macOS guide with some obvious changes.
Exact lists of dependencies for Debian and Arch need to be specified.
Also made minor fixes to Windows and macOS guides:
- changed http urls to https
- added --prefix=$PWD to crosstool-NG's configure
- added chmod u+w for the build output directory
In general, except for prerequisites, Linux and macOS guides are virtually identical.
It might make sense to refactor this into single document with prerequisites being
described in separate docs.
Ivan Grokhotkov [Tue, 23 Aug 2016 08:18:36 +0000 (16:18 +0800)]
make: add defconfig, don't run silentoldconfig before menuconfig
This commit fixes the case when new Kconfig configuration options were added and you run `make menuconfig`.
Previously this would first show console prompt to set values for new options, and then launch menuconfig.
Now this will just launch menuconfig.
New target is added, defconfig, which may be useful for non-interactive environments to set default values for
all new configuration options.
Ivan Grokhotkov [Tue, 23 Aug 2016 07:06:06 +0000 (15:06 +0800)]
Merge branch 'feature/nvs_tests' into 'master'
Power off recovery tests for non-volatile storage library, bug fixes, test coverage
This merge request:
- fixes several issues with internal state handling in nvs::Page
- fixes possible infinite loop when initializing namespace list
- fixes nvs_get_{str,blob} APIs to behave according to header file doc (they didn't return *length)
- adds extra consistency checks in nvs::PageManger initialization.
- adds test coverage via gcov and lcov
- adds host side tests during CI builds
Ivan Grokhotkov [Mon, 22 Aug 2016 04:11:32 +0000 (12:11 +0800)]
components/nvs: handle more cases where sudden power off may happen
This commit fixes several issues with state handling in nvs::Page. It also adds extra consistency checks in nvs::PageManger initialization.
These changes were verified with a new long-running test ("test recovery from sudden poweroff"). This test works by repeatedly performing same pseudorandom sequence of calls to nvs_ APIs. Each time it repeats the sequence, it introduces a failure into one of flash operations (write or erase). So if one iteration of this test needs, say, 25000 flash operations, then this test will run 25000 iterations, each time introducing the failure point at different location.
Ivan Grokhotkov [Tue, 23 Aug 2016 03:36:15 +0000 (11:36 +0800)]
Merge branch 'feature/docs_osx_gettingstarted' into 'master'
:blue_book: Setup guide for macOS
Initial version of getting started guide for macOS. Section on crosstool-NG may lack all the necessary steps, but usage of crosstool-NG on macOS is pretty well documented, so this shouldn't be a showstopper. We need to run these steps on a clean install of macOS, both with MacPorts and homebrew. I'll do this once i get a VM with macOS working.
Ivan Grokhotkov [Tue, 23 Aug 2016 03:22:15 +0000 (11:22 +0800)]
Merge branch 'feature/gitlab-ci' into 'master'
GitLab CI and sync with GitHub
This change adds GitLab CI support. Currently we pull latest version of esp-idf-template project from Github and try to compile it with esp-idf version in question.
Additional test steps will be added in the future.
This change also adds automatic push to GitHub for master branch only, if CI has passed.
To implement CI builds, I created a docker image, espressif/esp32-ci-env. I will make its Dockerfile available on Github as well.
Ivan Grokhotkov [Mon, 22 Aug 2016 07:02:22 +0000 (15:02 +0800)]
gitlab-ci: initial version
This change adds gitlab CI support. It tests if latest master of esp-idf-template can be built with the commit of ESP-IDF in question. Currently it's a bit lax because both SDK_PATH and IDF_PATH are defined.
This change also changes components/esp32/lib submodule to point to Github over HTTPS instead of SSH, because CI server might not have its SSH keys uploaded to Github.
Jeroen Domburg [Mon, 22 Aug 2016 09:33:29 +0000 (17:33 +0800)]
Merge branch 'bugfix/spurious_uninitialized_mux_notice' into 'master'
Add static initializers for muxes, add mutex init to vPortCPUAcquireMutex
We still have some ERROR: vPortCPUAcquireMutex: mux 0x3ffc01cc is uninitialized (0x0)! errors. I'd like to fix those by giving muxes as used in critical regions an initializer, so they can get initialized at program load. This is FreeRTOS core code, I'd like someone to review it before I commit it.