Commit graph

717 commits

Author SHA1 Message Date
Angus Gratton c15024e629 Merge branch 'master' into feature/build_component_project_vars 2016-11-14 14:54:41 +11:00
Angus Gratton ea4005e673 Merge branch 'feature/esptool_secure_boot' into 'master'
Secure boot support

Also includes a lot of esptool.py changes (two new command line tools, espefuse.py and espsecure.py)
https://github.com/themadinventor/esptool/compare/feature/esp32_v20_refactor...feature/esp32_secure_boot?expand=1


See merge request !163
2016-11-14 11:32:04 +08:00
Angus Gratton 09c7ccfa2c bootloader: Fix unused variable errors when secure boot is disabled 2016-11-14 14:22:37 +11:00
Angus Gratton 0b4fe9dd6d secure boot: Add warnings this feature is not finished yet 2016-11-14 14:22:36 +11:00
Angus Gratton 8691b54758 secure boot: Rename efuse option for UART bootloader to option for ROM interpreter 2016-11-14 11:08:42 +11:00
Angus Gratton bcdebda8e4 Build system: Don't shell-quote SEPARATOR variable or it evaluates as a bunch of wildcards! 2016-11-14 11:08:42 +11:00
Angus Gratton 5a5e19cd8b Bump esptool revision (espefuse.py fixes) 2016-11-14 11:08:42 +11:00
Angus Gratton e459f803da secure boot: Functional partition table & app signature verification 2016-11-14 11:08:42 +11:00
Angus Gratton fe66dd85f0 secure boot: Enable based on sdkconfig, remove "secure boot flag" from binary image 2016-11-14 11:08:42 +11:00
Angus Gratton ff1b2c6039 partition_table: Pad generated table to 0xC00 length, for easier signing 2016-11-14 11:08:42 +11:00
Angus Gratton 7402a1b973 partition_table: Move from 0x4000 to 0x8000
Also fix a bug with correctly padding bootloader image when length is
already a multiple of 16.
2016-11-14 11:08:42 +11:00
Angus Gratton 64f3893cb9 secure boot: Derive secure bootloader key from private key
Means only one key needs to be managed.
2016-11-14 11:08:42 +11:00
Angus Gratton b5de581399 Secure boot: initial image signature support 2016-11-14 11:08:42 +11:00
Jeroen Domburg f5cebd2666 Merge branch 'feature/per_cpu_interrupt_handlers' into 'master'
Per-CPU interrupt handlers and args

Up to now, the interrupt handlers and args were shared between CPUs, that is, if you set an interrupt handler on CPU0, CPU1 would invoke the same interrupt handler on that interrupt. This code gives every CPU its own space for interrupt handlers.

See merge request !192
2016-11-11 14:50:29 +08:00
Jeroen Domburg fdf3db1959 Comment fix 2016-11-11 12:26:42 +08:00
Angus Gratton 341593f7d2 build system: Remove need for $(Q) macro in recipes, use --silent in MAKEFLAGS instead 2016-11-11 12:32:47 +11:00
Liu Zhi Fu 2f6d71ff8c esp32: merge amsdu
esp32 now can support AMSDU
2016-11-10 21:12:22 +08:00
Jeroen Domburg eb067ce908 Merge branch 'driver_merge_tmp/merge_uart' into 'master'
Add UART driver

1. add uart.h and uart.c
2. add ESP_ERR_TIMEOUT in esp_err.h
3. add UART AHB FIFO address in uart_reg.h
4. modify xRingbufferSendFromISR return value in ringbuffer.c
5. add #include "soc/gpio_sig_map.h" in gpio.h

See merge request !146
2016-11-10 18:11:21 +08:00
Jeroen Domburg 07c30f22b5 Add core info to xt interrupt api 2016-11-10 18:04:23 +08:00
Jeroen Domburg 86d8f63005 Per-CPU interrupt handlers and args 2016-11-10 17:59:46 +08:00
Wangjialin 4f4c9030fd Fix uart tx bug, data pass(with flow control) through test ok. 2016-11-10 17:01:39 +08:00
Ivan Grokhotkov 3269653b94 Merge branch 'bugfix/nvs_lookup_failure' into 'master'
nvs: fix Page::findItem and Storage::findItem regression

When read caching was added, Page::findItem started modifying itemIndex reference argument even if item wasn't found.
Incidentally, Storage::findItem reused itemIndex when starting search at next page.
So,
- if the first page had a cached index (findItem was called for that page), and it pointed to a non-zero index,
- first page has a few empty items at the end (but is marked full),
- next search looked up the item on the second page,
- index of the item on the second page was less than the cached index on the first page,

then the search would fail because cached starting index was reused.

This change fixes both sides of the problem:
- Page::findItem shouldn't modify itemIndex argument if item is not found
- Storage::findItem should not reuse itemIndex between pages

Two tests have been added.

ref. TW8406

See merge request !171
2016-11-10 16:58:39 +08:00
Angus Gratton 208e83def7 build system: Refactor component.mk to not need component_common.mk
New makefile component_wrapper.mk allows some variables to be set
before component.mk is evaluated. This properly fixes problems with
sdkconfig being hard to access in all phases of the build.

Including component_common.mk is no longer necessary and will print a
deprecation warning for components which use it.
2016-11-10 15:52:22 +11:00
Wangjialin 6fb2515a5d Merge branch 'master' into driver_merge_tmp/merge_uart
# Conflicts:
#	components/esp32/include/esp_err.h
2016-11-10 11:57:19 +08:00
Angus Gratton 155f912433 build system: Don't build an sdkconfig for bootloader, share the top-level one
This works because all CONFIG variables are exported into child make processes.
2016-11-09 16:51:52 +11:00
Angus Gratton 830e5caf4d build system: Replace get_variable target w/ component_project_vars.mk generated makefiles
Reduces number of make invocations, allows variables exported in project
to be seen in all component make processes, not just the main ones.

Also makes a no-op build about 3x faster than it was.
2016-11-09 16:51:52 +11:00
Ivan Grokhotkov fcba7e278d Merge branch 'bugfix/github_issues' into 'master'
Fixes for github issues

This MR contains a bunch of small fixes for issues raised on Github and esp32.com forum:

- vfs doesn't check error code returned by open syscall
- spi_flash doesn't work when built in release mode
- duplicate definition of O_NONBLOCK when combining LwIP socket.h with sys/fcntl.h
- wrong order of creation of standard streams
- `_times_r` returning incorrect values, causing `clock`to return double of the actual time
- driver/gpio.h: comment fix
- wifi event handlers: fix incorrect MAC address printed by logging statements
- move some functions out of IRAM when compiling for bootloader

Please check commit descriptions for links to issues/forum posts and more details.


See merge request !183
2016-11-09 10:12:25 +08:00
Angus Gratton 0dff62051f Merge branch 'bugfix/compile_with_no_timers' into 'master'
newlib: fix compilation error when no timers are enabled in menuconfig

I have checked that three options (RTC/RTC+FRC1/FRC1) work, but didn't check "None" option.
This adds some missing ifdef blocks to remove "unused function/variable" warnings and fixes the use of `__errno_r` in a non-reentrant function.

See merge request !174
2016-11-09 09:21:23 +08:00
Ivan Grokhotkov cc072f1d8a wpa_supplicant: clean up unused variable warning 2016-11-08 20:26:12 +08:00
Angus Gratton c5793521a0 build system: Fix bootloader-flash target
ESP32 forum thread: http://esp32.com/viewtopic.php?f=2&t=407&p=1902#p1902
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 81b18aa8d5 bootloader: move some functions out of IRAM when building in bootloader mode
Fixes https://github.com/espressif/esp-idf/issues/80
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 1e4f185d29 wifi: use MACSTR and MAC2STR in logging statements
Fixes https://github.com/espressif/esp-idf/issues/49
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov f142da3ced driver/gpio: fix interrupt type names in comment block
https://github.com/espressif/esp-idf/issues/56
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov d29935b9ce newlib: fix _times_r syscall implementation
tms_cstime should only take system time in child processes into account, so has to be zero.
https://github.com/espressif/esp-idf/issues/81
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 6dd3681115 fix order of creation of standard streams
With existing order, file descriptors assigned to stdin, stdout, stderr didn't match standard assignment.
https://github.com/espressif/esp-idf/issues/67
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 3f8d9d71e2 lwip: fix duplicate definition of O_NONBLOCK
LwIP will define O_NONBLOCK in sockets.h if it isn't defined yet.
If sys/fcntl.h is included after socket.h, there will be duplicate definition.
Work around by including sys/fcntl.h into lwipopts.h.

https://github.com/espressif/esp-idf/issues/75
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov aa0cd0ab47 spi_flash: add missing volatile qualifier for lock flags
http://esp32.com/viewtopic.php?f=14&t=419&p=1901
2016-11-08 20:17:08 +08:00
Ivan Grokhotkov 13b3c916f3 vfs: check error code returned by FS driver open function
Fixes https://github.com/espressif/esp-idf/issues/78
2016-11-08 20:17:08 +08:00
Wu Jian Gang cdebf24954 Merge branch 'feature/tw8193_add_wifi_api_detail_return_code' into 'master'
esp32/make: add detailed return error code for wifi APIs

1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API

See merge request !187
2016-11-08 19:48:11 +08:00
Liu Zhi Fu 8dee0a3f6d esp32: modify the code according to review comments
1. Adjust error code definition
2. Refractor the comments for esp_wifi_internal_tx
2016-11-08 19:25:03 +08:00
Ivan Grokhotkov 414e5ce1d5 Merge branch 'bugfix/rmt_mem_struct' into 'master'
Only fix rmt_mem_t struct definition error.

Modify the struct definition according to technical_reference_manual. 
Tested.

```
typedef volatile struct {
    struct {
        union {
            struct {
                uint32_t duration0:    15;
                uint32_t level0:       1;
                uint32_t duration1:    15;
                uint32_t level1:       1;
            };
            uint32_t val;
        } data[64];
    } chan[8];
} rmt_mem_t;
```

See merge request !186
2016-11-08 18:47:53 +08:00
Liu Zhi Fu cb5f7690a4 esp32/make: add detailed return error code for wifi APIs
1. Add detailed return error code for wifi APIs
2. Add description about error code in esp_wifi.h
3. Modify esp_wifi_reg_rxcb to esp_wifi_internal_reg_rxcb
4. Modify esp_wifi_set_sta_ip to esp_wifi_internal_set_sta_ip
5. Mark system_init as deprecated API
2016-11-08 18:12:14 +08:00
Liu Zhi Fu 7340a77689 esp32: remove libcrypto according to review comments 2016-11-08 15:28:20 +08:00
Wangjialin 1418f886eb Only fix rmt_mem_t struct definition error. 2016-11-08 14:19:31 +08:00
Liu Zhi Fu 178db4bdd9 esp32: merge bt/wifi coexist code
1. Modify makefile to add coexist lib
2. Update bt/wifi coexist lib
2016-11-08 13:30:35 +08:00
Angus Gratton 98a0387854 bootloader_support: Move secure boot code to bootloader_support 2016-11-08 11:13:54 +11:00
Ivan Grokhotkov 0762b050dd Merge branch 'feature/integrate_unit_test_to_ci' into 'master'
integrate unit test to CI



See merge request !167
2016-11-07 21:17:08 +08:00
Ivan Grokhotkov 314cbcdb67 Merge branch 'feature/wpa_supplicant_libcrypto_source' into 'master'
wpa_supplicant: replace pre-built crypto library with source code

This change replaces libcrypto.a pre-built library with source code from wpa_supplicant.
For now i've decided to keep the modified layout of source and header files which is used in the esp32_rtos_sdk_core project. This will make it easier to move other parts of wpa_supplicant from esp32_rtos_sdk_core into esp-idf. Once we move everything, we can rearrange the files and upgrade wpa_supplicant to latest version.

See merge request !177
2016-11-07 21:15:49 +08:00
Wangjialin e452278194 Minor changes for driver
1. remove "\n" when calling ESP_LOGX APIs.
2. modify uart_event_t for uart rx data.
3. use MICRO for uart inverse value
4. add uart_tx_data_t for internal tx function.
2016-11-07 14:16:52 +08:00
Ivan Grokhotkov 8089afd453 build fix 2016-11-04 15:52:45 +08:00