Commit graph

842 commits

Author SHA1 Message Date
Ivan Grokhotkov 0ead095512 Merge branch 'bugfix/dport_stall_in_esp32_component' into 'master'
Also do dport stalling in esp32 component

See merge request !1141
2017-08-24 14:35:16 +08:00
Ivan Grokhotkov 327f0b6225 Merge branch 'bugfix/menuconfig_phy' into 'master'
component/esp32 : move Phy out of Wifi section

See merge request !1145
2017-08-24 14:34:56 +08:00
Jiang Jiang Jian d42208ffe8 Merge branch 'bugfix/ampdu_default_wifi_settings' into 'master'
wifi: Fix compilation error in WIFI_INIT_CONFIG_DEFAULT() if AMPDU disabled

See merge request !1139
2017-08-24 11:02:54 +08:00
Wang Jia Lin f1ecffb46c Merge branch 'bugfix/touch_pad_driver' into 'master'
driver(touch): fix bug and add more features

See merge request !1056
2017-08-23 19:12:39 +08:00
Tian Hao 08221589fc component/esp32 : move Phy outof Wifi section
1. move Phy out of Wifi section
2. lowercase the Ethernet and Phy from 2nd letter.
2017-08-23 17:51:31 +08:00
Jeroen Domburg 123966deea Also do dport stalling in esp32 component 2017-08-23 16:43:57 +08:00
Angus Gratton 83a3241341 wifi: Fix compilation error in WIFI_INIT_CONFIG_DEFAULT() if AMPDU disabled 2017-08-23 09:33:47 +10:00
Wangjialin 842caaab21 driver(touch): fix bug and add more features
1. add sens_struct.h
2. add definition of RTCCNTL and RTCIO
3. modify touch pad examples
4. update example code.
5. add comments add option in menuconfig
6. fix issue that pad index 8 and 9 are mismatched
7. add touch_pad_read_filtered() api to get value filtered by iir filter
8. modify touch pad isr func
9. Make the items in perihperal.ld in the sequence of address
10. delete Kconfig for touch pad
11. add touchpad filter APIs to adjust the filter
12. add touch_pad into index.rst
13. add touch_pad in Doxyfile
14. add touch_pad.rst
2017-08-22 21:21:39 +08:00
Ivan Grokhotkov fb43948413 Update several Kconfig files to make help texts compatible with ReST 2017-08-22 14:34:19 +08:00
Deng Xin d739e6bf05 WPA2:Fix the issue memory leak when run wifi enterprise
fix the issue memory leak when run wpa2
2017-08-22 10:49:31 +08:00
Jiang Jiang Jian fc85cb683d Merge branch 'feature/wifi_and_ip_event_process_refactor' into 'master'
Feature/wifi and ip event process refactor

See merge request !986
2017-08-21 19:49:30 +08:00
Ivan Grokhotkov 489c523870 vfs: support for blocking reads, more newline conversion options
Previously VFS driver for UART could only use simple non-blocking
functions to read from and write to the UART. UART driver provides more
complex blocking and interrupt-driven functions, which can be used
instead.
This commit adds optional support for using UART driver's functions.

Also added is a more flexible mechanism for configuring newline
conversion rules on input and output.

This commit also fixes a bug that all UARTs shared one static variable
used as a character buffer in newline conversion code. This variable is
changed to be per-UART.
2017-08-21 15:58:28 +08:00
Liu Zhi Fu b45433110f tcpip_adapter/lwip: optimize wifi/ip event 2017-08-21 14:36:44 +08:00
Kedar Sovani 4c1c62a453 wifi: refactor code to match ethernet's init function structure 2017-08-18 08:33:02 +05:30
Kedar Sovani 8348a71847 ethernet: remove CONFIG_ETHERNET
1. Hello World application shows no footprint difference before and
after this change
2. examples/ethernet/ethernet application compiles properly (can't
test with my board)
2017-08-18 08:31:43 +05:30
Kedar Sovani 6405d6f874 kconfig: Add an option for skipping binary blobs 2017-08-16 15:55:42 +05:30
Kedar Sovani ba8cd58b08 kconfig: Remove Wi-Fi on/off as a menuconfig option
This is no longer required since the functions automatically get
pulled in based on the usage. A quick summary of footprint
comparisions before and after these set of patches is shown below:

Hello-World: (simplified for readability)
 old Total image size:~ 104902 bytes (.bin may be padded larger)
 old Total image size:~ 105254 bytes (.bin may be padded larger)
 Per-archive contributions to ELF file:
             Archive File DRAM .data & .bss   IRAM Flash code & rodata   Total
 old              libesp32.a       1973    177   4445       3939     2267   12801
 new              libesp32.a       1973    185   4473       3939     2267   12837

 new             libnvs_flash.a          0     92      0        274        8     374
 new             libstdc++.a          0      0      0         24        0      24

For some reason, nvs_flash.a (~400bytes) gets pulled in (particularly
the nvs_flash_init() function).

Power-Save: (simplified for readability)
 old Total image size:~ 421347 bytes (.bin may be padded larger)
 old Total image size:~ 421235 bytes (.bin may be padded larger)

 old      libtcpip_adapter.a          0     81      0       1947      115       2143
 new      libtcpip_adapter.a          0     69      0       1897      115       2081

The size actually shrinks a bit, since the AP interface function
doesn't get pulled in.
2017-08-16 15:55:28 +05:30
Kedar Sovani a24130b390 tcpip_adapter: Decompose tcpip_adapter_start() into interface specification options
Since only the used interface's start function gets called, it pulls
in only the functions that are required in the current application,
thereby saving footprint.
2017-08-16 15:54:29 +05:30
Kedar Sovani 159e7e81b4 esp32: Make 'restart' function independent of Wi-Fi
Restart being a lower-layer system-level function, needn't depend on
the higher level Wi-Fi libraries.

This also enables us to get rid of one more WIFI_ENABLED ifdef check
2017-08-16 15:54:28 +05:30
Kedar Sovani a41b1a9d1f esp32: Register event handlers on the esp_wifi_init() call 2017-08-16 15:54:28 +05:30
Kedar Sovani 55a6aca355 wifi: Map esp_wifi_init() to esp_wifi_init_internal()
Follow-on patches will include additional functionality in
esp_wifi_init()
2017-08-16 15:54:28 +05:30
Kedar Sovani 8063b93497 wifi_lib: Update to the change in the wifi_lib repository 2017-08-16 15:54:13 +05:30
Deng Xin 57bc38d867 Add the fast crypto function in supplicant
optimize the speed when do wifi connect
2017-08-09 21:36:13 +08:00
XiaXiaotian 1c4f7f2081 add get and set wifi maximum transmit power API 2017-07-28 15:06:52 +08:00
Liu Zhi Fu c99c5d13e6 esp32: add menuconfig options to configure BA window
Make AMPDU Block Ack Window configurable in menuconfig because we need to configure it
in some special cases, such as iperf test etc
2017-07-25 13:11:38 +08:00
Ivan Grokhotkov 292c2abd3b Merge branch 'bugfix/init_nvs_in_bluetooth' into 'master'
bt: call nvs_flash_init in examples, show error if NVS is not initialized

See merge request !1003
2017-07-20 14:25:49 +08:00
Angus Gratton 105c4b7386 Merge branch 'feature/esptool_image_padding' into 'master'
esptool: Optimise app image size by using RAM-loaded data for padding

See merge request !1017
2017-07-19 15:52:22 +08:00
Angus Gratton 2d9770fd00 linker script: Add some comments about significance of 0x18 byte offset 2017-07-19 17:38:05 +10:00
Angus Gratton c230e4280c linker scripts: Limit DROM/IROM section lengths correctly 2017-07-19 16:33:48 +10:00
Angus Gratton d92c541b1a esptool: Optimise generated image size by using RAM-loaded data for padding
Can save almost 128KB from some images.
2017-07-19 16:24:17 +10:00
Angus Gratton d664e32394 build system: Use component.mk for all components, refactor bootloader build
For config-only components, component.mk should now contain "COMPONENT_CONFIG_ONLY := 1"

Also refactored some of the generation of linker paths, library list. This required cleaning up the way the bootloader
project works, it's now mostly independent from the parent.
2017-07-19 09:10:48 +10:00
Ivan Grokhotkov 0ae916d555 Merge branch 'feature/high_level_interrupts' into 'master'
Break out high-level interrupts so a component can override them

See merge request !675
2017-07-18 10:42:31 +08:00
Angus Gratton 4029ed1df4 Merge branch 'bugfix/rom_gpio_typo' into 'master'
bugfix(typo): fix typo in rom/gpio.h

See merge request !1009
2017-07-18 06:53:30 +08:00
Ivan Grokhotkov 979fce0df5 bt: call nvs_flash_init in examples, show error if NVS is not initialized
NVS is used to store PHY calibration data, WiFi configuration, and BT
configuration. Previously BT examples did not call nvs_flash_init,
relying on the fact that it is called during PHY init. However PHY init
did not handle possible NVS initialization errors.

This change moves PHY init procedure into the application, and adds
diagnostic messages to BT config management routines if NVS is not
initialized.
2017-07-17 21:29:50 +08:00
Wangjialin 10340d718f bugfix(typo): fix typo in rom/gpio.h 2017-07-17 15:41:02 +08:00
Angus Gratton e50870c2dc Merge branch 'bugfix/bootloader_stack_smash' into 'master'
Fix crashes when >approx 185KB of DRAM is statically allocated

See merge request !983
2017-07-17 14:11:35 +08:00
Angus Gratton f824829a13 Merge branch 'bugfix/dont_link_unused_data_sections' into 'master'
ld: Save RAM by removing unused .data sections at link time

See merge request !985
2017-07-17 14:10:12 +08:00
Jiang Jiang Jian fc4d3df890 Merge branch 'bugfix/tw13744_make_low_rate_work' into 'master'
esp32: update wifi lib to make low rate work

See merge request !965
2017-07-13 14:26:02 +08:00
Ivan Grokhotkov 7fc25f18d2 Merge branch 'feature/enable_brownout_detector' into 'master'
Enable brownout detector

See merge request !811
2017-07-13 11:40:37 +08:00
Angus Gratton d8d2933bde Merge branch 'bugfix/gdbstub_handler_noreturn' into 'master'
gdbstub: Mark the panic handler entry as noreturn

See merge request !975
2017-07-12 17:23:59 +08:00
Angus Gratton cfbb1a652b Merge branch 'doc/esp_random' into 'master'
esp_random: Add some documentation about using before RF subsystem is on

See merge request !976
2017-07-12 16:18:43 +08:00
Angus Gratton 99fe61716c startup: Add assertion checks around various initialisation sequences
These may fail if close to 192KB of static RAM is allocated (remaining early heap RAM is too small.)
2017-07-12 13:06:56 +08:00
Angus Gratton 2b0f623259 bootloader/early boot: Error out if >192KB of static DRAM is allocated (temporary fix)
Currently the last 128KB of DRAM is reserved for the bootloader & early boot stacks. This means if >192KB of static DRAM
is allocated, the only available heap is this region - which is disabled until the scheduler starts. As a result, you
get either heap corruption on early boot if the static data overlaps startup heap (leading to very weird errors), or
FreeRTOS will fail to start when it can't malloc() anything.

Long term fix is to move the stacks & bootloader data to the very end of RAM, and only reserve that part for early
boot. This is a little fiddly because of also wanting to make sure this memory is not preemptively fragmented when it
gets reintroduced to the heap. This will become more important if/when we have more static allocation options in the
future.

For now, these errors make it clear why the boot has failed.

Ref TW13909
2017-07-12 13:06:56 +08:00
Angus Gratton 187b5fb888 ld: Remove unused .data sections at link time
Reduces static RAM, code size.
2017-07-12 13:05:54 +08:00
Angus Gratton 3bb90bab97 esp_random: Add some documentation about using before RF subsystem is on 2017-07-11 14:27:20 +08:00
Angus Gratton c049cd55a6 gdbstub: Mark the panic handler entry as noreturn
Fixes a warning in panic.c when this panic mode is enabled.
2017-07-11 10:18:08 +08:00
Angus Gratton 71c70cb15c heap: Refactor heap regions/capabilities out of FreeRTOS
Remove tagged heap API, rename caps_xxx to heap_caps_xxx

Also includes additional heap_caps_xxx inspection functions.
2017-07-10 17:46:03 +08:00
Angus Gratton 5ee49fd311 heap: Add new multi_heap heap implementation to replace FreeRTOS-based tagged heaps 2017-07-10 17:46:03 +08:00
Ivan Grokhotkov 01b185977c brownout detector: enable by default
Because of errata related to BOD reset function, brownout is handled as follows:

- attach an ISR to brownout interrupt
- when ISR happens, print a message and do a software restart
- esp_restart_nonos enables RTC watchdog, so if restart fails,
  there will be  one more attempt to restart (using the RTC
  watchdog)
2017-07-10 17:25:55 +08:00
Ivan Grokhotkov 780569c04a esp32: fix RTC watchdog configuration in esp_restart
RTC watchdog didn’t have any actions configured for any of the stages.
This change configures it to use SW_SYSTEM_RESET at stage 0 and a
full reset at stage 1. The timeout is now calculated based on
RTC_SLOW_CLK frequency.
2017-07-10 17:21:49 +08:00