Commit graph

1088 commits

Author SHA1 Message Date
Jeroen Domburg 7dc322273c Merge branch 'bugfix/ringbuffer_item_return_bug_report_from_chunguang' into 'master'
bugfix: ringbuffer return item api

Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR

See merge request !246
2016-11-25 09:31:20 +08:00
Wang Jia Lin 35ae2cd1a5 Merge branch 'driver_merge_tmp/merge_pcnt' into 'master'
driver: PCNT

1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.

See merge request !229
2016-11-25 00:41:16 +08:00
Ivan Grokhotkov 5eb2d16acd Merge branch 'bugfix/uart_argument_names' into 'master'
uart: use same argument names in get/set functions

This one is pretty trivial: rename arguments so that same name is used for get and set functions.

https://github.com/espressif/esp-idf/issues/105

See merge request !248
2016-11-24 23:56:35 +08:00
Ivan Grokhotkov c17ee8a914 Merge branch 'bugfix/unit_test_run' into 'master' 2016-11-24 18:29:32 +08:00
Ivan Grokhotkov 1bcd90d45d Merge branch 'feature/system_apis' into 'master'
system_* APIs cleanup

This changeset is mostly about cleaning up `system_*` APIs and moving them from libcore. It has dragged a few more changes along, however.

- `system_deep_sleep` deprecated, new name is `esp_deep_sleep`
- `system_efuse_read_mac` deprecated, new name is `esp_efuse_read_mac`
- `system_read/write_rtc_mem` removed (reason: we use linker to place code/data into RTC memory now)
- `system_get_sdk_version` deprecated. Returns "master" for now. Support for compile-time and runtime version detection will be done in a separate MR.
- `system_get_time` and variations have been deprecated. `gettimeofday` should be used instead.
- `system_restart` deprecated, new name is `esp_restart`. Rewritten code to work correctly from any of the cores.
- `system_restore` deprecated, `esp_wifi_restore` should be used instead.
- `system_get_rst_info` removed (it wasn't in a header file)
- RTC library has been updated to latest version
- Logging output from `libfoo.a` goes through `foo_printf` function now, where `foo ` is any of the library names. For libraries other than rtc and phy, this is a temporary measure, until we finish switching to esp_log library and clean up all uses of printf/ets_printf.
- ESP-IDF build will fail if any of the libraries have printf/ets_printf reference.
-  Added `esp_random` function which gets values from HW RNG. I have added code which makes sure the value is not polled too often (allows at least 16 APB cycles). Also added a header file for HW RNG (just one register).
- Moved random number generation functions used by wpa library into wpa_supplicant component.

See merge request !234
2016-11-24 18:22:50 +08:00
Xia Xiaotian 422e95db9c system_apis: update wifi lib and librtc.a
1. some refractor to debug info in wifi lib(da6280b3)

2. fix bug of hung at phy_int in librtc.a(1bb9ce1d)
2016-11-24 17:55:37 +08:00
Ivan Grokhotkov 79482bbee7 uart: use same argument names in get/set functions
https://github.com/espressif/esp-idf/issues/105
2016-11-24 13:56:18 +08:00
Angus Gratton 7e433ae3f4 Merge branch 'bugfix/uart_isr_rodata' into 'master'
UART driver: Fix crash in ISR due to "UART" static array moved to flash

Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.

See merge request !245
2016-11-24 12:09:46 +08:00
Angus Gratton 3b937c5ef8 Merge branch 'bugfix/rmt_includes' into 'master'
Fix inclusion of stdlib.h

Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551
    
rmt.c should include stdlib.h for malloc, esp_bignum,c & https_request_main.c should include it for abort().
    
FreeRTOSConfig.h is only including stdlib if CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is included for abort() so needs to be included whenever CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.
    
This change includes it unconditionally in FreeRTOSConfig.h. This is to avoid this kind of bug where compiler errors are dependent on config. I suggest we don't change this to be more selective until we have 'make randomconfig' style tests in CI.


See merge request !244
2016-11-24 12:09:19 +08:00
Wangjialin f97f198c9d driver: improve pulse counter code
1. Modify some comments in pcnt.h
2. Modify api/pcnt.rst
3. Improve example code.
4. Add status definitions in pcnt_reg.h
2016-11-24 12:01:21 +08:00
Wangjialin 6d502cebe9 bugfix: ringbuffer return item api
Report from chunguang, vRingbufferReturnItem should not call portENTER_CRITICAL_ISR
2016-11-24 10:31:27 +08:00
Angus Gratton 79646f41b5 Fixes for stdlib.h inclusion
Refs:
http://esp32.com/viewtopic.php?f=13&t=550
http://esp32.com/viewtopic.php?f=13&t=551

rmt.c should include stdlib.h for malloc, esp_bignum,c &
https_request_main.c for abort().

FreeRTOSConfig.h is only including stdlib if
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is set. However, it is
included for abort() so needs to be included whenever
CONFIG_FREERTOS_ASSERT_FAIL_ABORT is set.

This change includes unconditionally in FreeRTOSConfig.h. This is to
avoid this kind of bug where compiler errors are dependent on config. I
suggest we don't change this to be more selective until we have 'make
randomconfig' style tests in CI.
2016-11-24 08:20:21 +11:00
Wangjialin 452bee7181 update docs/index.rst 2016-11-23 21:25:06 +08:00
Wangjialin a97e076dec add pcnt.rst 2016-11-23 19:07:30 +08:00
Wangjialin 6db1482cd5 Merge branch 'master' into driver_merge_tmp/merge_pcnt
# Conflicts:
#	components/driver/include/driver/periph_ctrl.h
2016-11-23 18:15:54 +08:00
Wangjialin 7571b8c2e4 driver: PCNT
minor changes
2016-11-23 18:10:45 +08:00
antti 13e7e69239 remove unexisting tests in unit test CIConfig 2016-11-23 16:22:51 +08:00
antti ca76f53283 remove fp unit test Kconfig 2016-11-23 16:22:34 +08:00
Ivan Grokhotkov 9ccb104895 CI: fix unit test artifact path 2016-11-23 15:43:14 +08:00
Ivan Grokhotkov 50f178c1ce esp32: add some implementation comments 2016-11-23 12:55:49 +08:00
Ivan Grokhotkov 137c027274 Merge branch 'feature/integrate_unit_tests' into 'master'
Integrate unit tests into build system

This MR moves unit tests from esp-idf-tests repository into 'test' subdirectories of respective components.

Tests are run using a runner app in tools/unit-test-app.

This needs a bit of cleanup:

1. remove extra newlines added to makefiles,
2. re-format unit tests code which has tabs
3. write a document on using this test app
4. maybe some refactoring in project.mk

I think 1&2&4 need to be done in this MR, while 3 may be done in a follow-up one.

See merge request !221
2016-11-23 12:13:39 +08:00
Ivan Grokhotkov 38303052f3 Merge branch 'bugfix/freertos_staticqueue_size' into 'master'
StaticQueue_t needs to have the same size as xQUEUE.

https://github.com/espressif/esp-idf/pull/98

Without this change, building FreeRTOS with static allocation enabled succeeds, but trying to create a queue from a static buffer causes an assert because the size of static and dynamic queues differ.

See merge request !236
2016-11-23 12:04:53 +08:00
antti 15d96eccdb add build all unit tests in project.mk and update doc 2016-11-23 11:42:12 +08:00
Angus Gratton 0b75ff5a6d Merge branch 'bugfix/build_system_secure_boot_embed' into 'master'
Build system: Fix a bug with embedding binaries in object files

Sometimes paths were generated absolute, need to keep those as-is

See merge request !228
2016-11-23 11:35:22 +08:00
antti 83a3ce882f add updated nvs flash test 2016-11-23 11:29:36 +08:00
Angus Gratton 8693e805df Merge branch 'bugfix/embed_text_files' into 'master'
build system: Fix null-terminating of text files for embedding on OS X

Ref github #112

`/bin/echo -ne` echoes literal `-ne` on OS X.


See merge request !238
2016-11-23 11:26:08 +08:00
Angus Gratton 1d05f41a70 UART driver: Fix crash in ISR due to "UART" static array moved to flash
Ref: http://esp32.com/viewtopic.php?f=13&t=546&sid=76ff371ae2b259441a2cf355e96d74b9#p2275

This is a really subtle bug, gcc noticed the UART array elements are read-only so
implicitly moved the elements to .rodata as if it was const. However
this array is accessed from the UART ISR, so has to be in IRAM or DRAM.
2016-11-23 10:58:03 +11:00
Angus Gratton 180f4d0929 FreeRTOS: Use C11 _Static_assert to verify static "dummy" structs at compile time
Includes a tweak to make Static_task_t equal size to TCB_t when using
MPU_WRAPPERS . Matches tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE macro
in tasks.c. This isn't actually a bug (if static task allocation is off,
there is no use for Static_task_t), but it allows us to make consistent
compile-time checks that Static_task_t == TCB_t.
2016-11-23 10:22:19 +11:00
Angus Gratton 5ac7810480 build system: Fix null-terminating of text files for embedding on OS X
Ref github #112
2016-11-23 08:49:15 +11:00
Daniel Campora 2a73783bc6 StaticQueue_t needs to have the same size as xQUEUE.
Without this change, building FreeRTOS with static allocation enabled succeeds, but trying to create a queue from a static buffer causes an assert because the size of static and dynamic queues differ.
2016-11-22 22:29:27 +08:00
Ivan Grokhotkov df6edb50e9 implement esp_deep_sleep, fix build issues 2016-11-22 21:54:49 +08:00
Ivan Grokhotkov cf6fc7c741 Add API for random number generator 2016-11-22 21:14:37 +08:00
Ivan Grokhotkov 46a39b1e0f catch log output from WiFi libs 2016-11-22 21:14:36 +08:00
Ivan Grokhotkov 8b2f933a51 Implement system_* APIs in IDF 2016-11-22 21:14:36 +08:00
Ivan Grokhotkov 2393d829de remove legacy definitions from esp_types.h 2016-11-22 21:14:36 +08:00
Wu Jian Gang d0c9c1de57 Merge branch 'bugfix/tw8727_pc_send_random_pkt_cause_esp32_watchdog' into 'master'
esp32: fix random pkt cause esp32 watchdog

This change fixes the ESP32 watchdog issue. When the MPDU of AMPDU is longer than 1600B,
esp32 will check whether the last 4B is DEADBEEF, if it's not DEADBEEF, it will assert
and the assert will cause esp32 watchdog. The solution is to init the last 4B to DEADBEEF
when malloc new ebuf for the packet longer than 1600B.

See merge request !233
2016-11-22 19:19:10 +08:00
antti d390449371 add unit tests to esp-idf
rename nvs host test folder, modify .gitlab-ci.yml

remove unit-test-app build

re-format unit test files

remove extra newlines in project.mk

some refactoring for unit test part in project.mk

add build files of unit-test-app in gitignore

add README.md for unit test app

correct headings in README.md

remove files and make minor tweaks in unit test app

update .gitlab-ci.yml to use unit test app

delete unused lines in component_wrapper.mk

delete periph_i2s.h and lcd test

add text floating point in components/esp32/test/Kconfig

correct idf test build paths in .gitlab-ci.yml
2016-11-22 14:45:50 +08:00
Wu Jian Gang e05fe28574 Merge branch 'bugfix/arp_queue_failed' into 'master'
report the arp queue fail result



See merge request !227
2016-11-22 14:45:44 +08:00
Ivan Grokhotkov 383d987697 Merge branch 'doc/pr103_cleanup' into 'master'
Documentation cleanup

From @kryzchb, github pull request #103

See merge request !214
2016-11-22 13:26:56 +08:00
Jeroen Domburg 720a6c1e54 Merge branch 'bugfix/gpio_config_pullup' into 'master'
Fix pullups is not configured by gpio_config

https://github.com/espressif/esp-idf/issues/110

https://github.com/espressif/esp-idf/pull/111

See merge request !226
2016-11-22 12:12:31 +08:00
Wu Jian Gang 46c81ded73 Merge branch 'feature/tw8799_low_level_output_optimize' into 'master'
Feature/tw8799 low level output optimize

Fix a potential memory crash error in low_level_output

See merge request !224
2016-11-22 11:56:35 +08:00
Liu Zhi Fu 4bf0465dab esp32: fix random pkt cause esp32 watchdog
This change fixes the ESP32 watchdog issue. When the MPDU of AMPDU is longer than 1600B,
esp32 will check whether the last 4B is DEADBEEF, if it's not DEADBEEF, it will assert
and the assert will cause esp32 watchdog. The solution is to init the last 4B to DEADBEEF
when malloc new ebuf for the packet longer than 1600B.
2016-11-22 11:46:10 +08:00
tianzhongxing cc39b7b286 components/lwip/arp: change the arp dropping packet function
LWIP will drop the oldest package at the arp packet cache queue and return "ERR_OK"
We change it that ARP level will drop the current packet and return "ERR_MEM" to tell user that you should send the packet again latter.
2016-11-22 10:11:52 +08:00
Ivan Grokhotkov d467eabadb Merge branch 'driver_merge_tmp/merge_rmt' into 'master'
RMT driver code and example

* add RMT simple driver code.
* add RMT module in periph_ctrl.c/.h
* add infrared RMT example. Will add readme later.

See merge request !190
2016-11-22 01:57:01 +08:00
Wangjialin 235eceea06 rmt: add documentation 2016-11-22 01:44:23 +08:00
Wangjialin 6a1dbc3f1c add RMT driver and example 2016-11-22 00:57:19 +08:00
Wu Jian Gang 07fc868ea6 Merge branch 'feature/ipv6_api' into 'master'
Ipv6 interface:add branch for ipv6 interface



See merge request !199
2016-11-21 19:43:51 +08:00
Wangjialin 1cc1d9d721 driver: Add PCNT code
1. add PCNT module in periph_ctrl.c/.h
2. add description of PCNT status in pcnt_struct.h
3. add PCNT driver code
4. add PCNT example code.
2016-11-21 18:17:07 +08:00
Angus Gratton 7681dbec93 Merge branch 'feature/bignum_rsa' into 'master'
hwcryto bignum support for RSA operations

Supporting RSA with hardware bignum directives.

Configurable via menuconfig to enable/disable, and to choose between busywaiting and interrupt driven completion.

May still be some performance tweaks possible.

TW7111

See merge request !92
2016-11-21 17:46:21 +08:00
Liu Zhi Fu 586c17f831 lwip: remove useless printf info 2016-11-21 16:08:39 +08:00