Commit graph

31 commits

Author SHA1 Message Date
Andrew Clink
03597d9162 Make FreeRTOS hooks weak; Add example 2017-03-20 12:56:17 -07:00
Tuan PM
2b915c11c7 add some missing include & fixed display output on sh1104 (#319)
* add some missing include

* Fixed display on SH1106
2017-01-03 00:40:54 +02:00
Our Air Quality
1728ef3dfc Flush the uart tx fifo before a restart. (#274)
Also comment the point at which the bus clock that drives the uart changes on startup and comment out the change in the uart divisor. This at least allows a consistent uart baud rate during a restart if using the rate 115200.
2016-11-18 11:34:03 +02:00
Our Air Quality
e48910ea3b Update and re-organise the sdk internal definitions. (#267) 2016-11-14 00:05:13 +02:00
Our Air Quality
a5cc728079 FreeRTOS type updates. (#261) 2016-11-05 12:04:03 +02:00
OurAirQuality
7bab80c33d FreeRTOS v9.0.0 upgrade 2016-10-25 23:35:51 +11:00
Johan Kanflo
40dc3bf945 Sysparam by @foogod (#180)
* Sysparam implementation

sysparam improvements

Mostly done, a few minor cleanups left.

Add sysparam_editor example

Sysparam code cleanup

Add documentation to sysparam.h

Fix up sysparam.h docs

Added a couple more debug statements

Fix potential memory leak if realloc() fails

Major sysparam overhaul

Add sysparam_get_info function

Add sysparam initialization to app_main.c

* Fixed warnings, added license
2016-08-18 12:07:46 +02:00
Angus Gratton
678b59babf Honour values of configCPU_CLOCK_HZ & configTICK_RATE_HZ for tick rate
Fixes #147

* Can vary tick rate from 100Hz via configTICK_RATE_HZ. Note that the
  SDK binary libraries are hard-coded to assume the tick rate is 100Hz,
  so changing the tick rate may have unexpected consequences for lower
  layer WiFi behaviour (such as certain kinds of timeouts happening
  faster/slower.)

* Setting configCPU_CLOCK_HZ to 160MHz means ESP will set 160MHz during
  initialisation. Only 80MHz and 160MHz are supported.

* Timing of tasks is no longer affected by current CPU freq (whether set
  via configCPU_CLOCK_HZ or via sdk_system_update_cpu_freq().)
  Previously doubling the CPU frequency would double the tick rate.
2016-07-06 17:22:09 +10:00
Alex Stewart
8c9a77efe8 Added first half of RE'd user_interface.c 2016-07-06 17:21:34 +10:00
Angus Gratton
04b119a61e Seed libc PRNG from hardware RNG on reset 2016-06-30 08:18:10 +10:00
Angus Gratton
3ba19d7c4e Merge pull request #137 from SuperHouse/feature/better_crash_dumps
Better crash dumps
2016-05-17 09:38:19 +10:00
Angus Gratton
36886412e6 Add abort() implementation
Also reduces the IRAM footprint of the fatal exception handler, as only
the prelude (which disables interrupts & enables the flash mapping) is
in IRAM now.

Closes #54, relevant to #133.
2016-05-15 22:30:01 +10:00
Angus Gratton
52f9b13faf Break out debug dump functions into their own compilation unit 2016-05-15 22:30:01 +10:00
Angus Gratton
f9fb0f212c Add stack memory dump to fatal exception handler 2016-05-15 22:24:40 +10:00
Angus Gratton
b61d06e940 Wrap structure around phy_info PHY initialisation settings
Add notes based on testing some of the values found there.
2016-05-15 22:21:10 +10:00
Angus Gratton
fee987d5cf Startup code: Move user_start_phase2 to irom section
This saves 1020 bytes from the text (IRAM) section by preventing
inlining of user_start_phase2() (and dump_flash_config_sectors() as
well) into the IRAM function sdk_user_start().
2016-05-15 22:16:42 +10:00
Angus Gratton
dccc57433d Move static constructor calls to after PHY, clock & baud rate are setup
Otherwise anything printed inside the constructor happens at unexpected baud rate.

Ref #128
2016-04-24 18:52:20 +10:00
Angus Gratton
b61b62136b gcc __attribute__((constructor)): Remove hacked calling, move ctor sections to flash
More hacky moving of parts of .rodata to flash, until we can move all of
it.

Candidate fix for #128
2016-04-24 18:52:16 +10:00
Angus Gratton
d1091b69d1 Make the task stack overflow message clearer
Related to #96
2016-02-24 08:54:32 +11:00
Angus Gratton
c2e3541c05 Disable default line-buffering of stdout
As discussed in #52. Application can re-enable buffering on stdout with setbuf() or setbuf()
2015-10-11 09:21:30 +11:00
Angus Gratton
0c6a8881a4 Fix sdk_uart_rx_one_char implementation, move into sdk_compat.c 2015-10-06 23:48:28 +11:00
Angus Gratton
7823a28ff8 Change default baud rate back to 74906bps, compatible with boot ROM rate
This reverts a behaviour change from 3ceadfc0a6.
2015-10-06 23:11:17 +11:00
Angus Gratton
0c0668bfa0 app_main: Refactor to use uart.h functions instead of raw register access
This removes the automatic insertion of CR ahead of LF by the SDK putc
function when called inside the SDK (although we'd already replaced
printf, so most were bypassing this putc function anyhow.)
2015-10-06 18:14:05 +11:00
Angus Gratton
3ceadfc0a6 uart.h: Add uart_get_baud/uart_set_baud functions, change default baud rate from 74906 to 115200 2015-10-06 17:49:00 +11:00
Alex Stewart
b280f8a725 Fix format strings in app_main.c 2015-09-20 14:09:30 -07:00
Alex Stewart
19f01b2f72 app_main.c: load correct g_ic sector from flash 2015-08-30 13:37:40 -07:00
Alex Stewart
8b5e8b923e Bug fix for dump_flash_config_sectors 2015-08-30 12:11:08 -07:00
Alex Stewart
a88f36d986 More app_main.c fixups
It's alive! IT'S ALIVE!!
2015-08-28 18:53:43 -07:00
Alex Stewart
a9eb3a38e3 More app_main fixups from object code comparisons 2015-08-28 18:53:43 -07:00
Alex Stewart
aa7f305e16 Various app_main.c bug fixes 2015-08-28 18:53:43 -07:00
Alex Stewart
a044c061d5 Replace libmain:app_main.o with core/app_main.c 2015-08-28 18:53:43 -07:00