Commit graph

53 commits

Author SHA1 Message Date
Our Air Quality
59a4d85663 FreeRTOS v10.0.1
Mainly some simplifications to the copyright terms.
2017-12-23 21:10:57 +11:00
Ruslan V. Uss
c3ae04c93f
Merge pull request #511 from ourairquality/newlib-locks
Newlib: implement locks
2017-12-14 08:30:20 +05:00
Our Air Quality
36322def89 FreeRTOS v10 fixes.
svn r2522:
FreeRTOS kernel: Fix extern "C" { in stream_buffer.h.
FreeRTOS kernel: Correct tskKERNEL_VERSION_NUMBER and tskKERNEL_VERSION_MAJOR constants for V10.
Ensure the currently executing task is printed correctly in vTaskList().
2017-12-13 21:16:40 +11:00
Our Air Quality
e9d9201527 Newlib: implement locks
* Dynamically allocate arc4random data. Saves about 1k off the bss.
2017-12-13 11:29:43 +11:00
Our Air Quality
a7f7f5c01c FreeRTOS v10.0.0
Based on svn r2519.

* Re-licensed with the MIT license, and by Amazon.

* New for this releases are Stream buffers and message buffers.
2017-12-07 11:13:07 +11:00
Our Air Quality
17eb160be7 FreeRTOS 9.0.1 2017-08-30 13:51:32 +10:00
Our Air Quality
5583543f14 Add an argument to ISRs. Disable interrupts while masking them. 2017-08-30 13:51:32 +10: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
Vlad Ivanov
c9851e9253 FreeRTOS: Drop reference to xthal_set_intset (#198) 2016-08-27 22:23:27 +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
Angus Gratton
f0db26604f brk/malloc: Allow malloc to fail when out of RAM
Fixes #76.
2016-05-27 12:09:07 +10:00
Angus Gratton
981c87899b Add heap information to fatal exception & abort dumps 2016-05-15 22:30:01 +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
89c481c606 Simplify interrupt and RTOS timer tick handlers
RTOS Timer tick handler is now the same as any other ISR.

This causes a few subtle behaviour changes that seem OK but are worth noting:

* RTOS tick handler sdk__xt_timer_int() is now called from one stack
  frame deeper (inside _xt_isr_handler()), whereas before it was called
  from the level above in UserHandleInterrupt. I can't see any way that
  the extra ~40 bytes of stack use here hurt, though.

* sdk__xt_timer_int() was previous called after all other interrupts
  flagged in the handler, now it's called before the TIMER FRC1 & FRC2
  handlers. The tick handler doesn't appear to do anything particularly
  timing intensive, though.

* GPIO interrupt (value 3) is now lower priority than the SPI
  interrupt (value 2), whereas before it would have been called before
  SPI if both interrupts triggered at once.
2015-09-29 13:21:04 +10:00
Angus Gratton
ed8470631f Consolidate interrupt management in core as esp/interrupts.h & esp_interrupts.c 2015-09-28 22:15:40 +10:00
Alex Stewart
ba7492756c Merge branch 'master' into open-startup 2015-09-20 14:05:54 -07:00
Alex Stewart
43a712572c Don't rename FreeRTOS hook symbols 2015-08-28 18:53:43 -07:00
Angus Gratton
424dc0f3b0 Add C++ support to Makefile, and proof-of-concept simple.cpp example
This is a work in progress based on @mikejac's work.

Missing:
* No 'new' operator.
* I don't think STL is currently supported.
2015-08-10 16:14:30 +10:00
Angus Gratton
efc454035c Move all code paths touched by NMI to IRAM
Prerequisite for calling Cache_Read_Disable() for OTA updates.

Massive thanks due to @foogod and their xtobjdis tool, creating the call
graph of where the wDev_ProcessFiq touched (including in newlib, etc.)
would have otherwise been very painful:
https://bitbucket.org/foogod/xtobjdis
2015-07-29 16:47:33 +10:00
Angus Gratton
ed7ba52c9a Add exception vectors & low-level handlers
At the moment these are almost bit-for-bit copies of the vector
behaviour in the RTOS SDK, but hopefully that will start to change.

Progress towards #2
2015-07-28 11:01:57 +10:00
Angus Gratton
86188c01fd Merge branch 'newlib' 2015-07-15 16:01:18 +10:00
Angus Gratton
4217a1029e xtensa_interrupts: Add _xt_disable_interrupts/_xt_restore_interrupts inline functions 2015-06-18 11:30:13 +10:00
Angus Gratton
72b61b17f8 Create a default FreeRTOSConfig.h, can override on a per-program basis
Closes #12
2015-06-16 17:28:32 +10:00
Angus Gratton
aaef4b0644 Replace all binary SDK libc functions with newlib
Adds a new build step to remove the SDK object files listed in
<libname>.remove.

Closes #1.
2015-06-16 14:21:24 +10:00
Angus Gratton
f0b5bc324c Implement xPortGetFreeHeapSize when using libc memory management 2015-06-16 14:20:52 +10:00
Angus Gratton
49268a33e1 Link against newlib from esp-open-sdk's libcirom, replace FreeRTOS heap management.
Compiles and runs, expects xtensa lock.c patch in newlib (will still run
otherwise but malloc/free and other functions will be non-memory-safe...)
2015-06-16 14:20:24 +10:00
Angus Gratton
822533fd92 Interrupt support refactor
Write inline versions for SDK-based interrupt convenience functions.
2015-06-08 18:20:29 +10:00
Angus Gratton
0dbb6d31a5 Add IRAM attribute for IRAM loaded symbols, add to common FreeRTOS functions
Closes #7.

It'd be nice to change the linker script so .text is always linked to
IROM instead of needing to objcopy each compiled file. The sticking
point for this is libgcc & libhal, which have symbols in .text that need
to be loaded to IRAM.
2015-06-08 18:19:59 +10:00
Angus Gratton
2c46be9825 Basic support for GPIOs 0-15.
Start new 'core' component for low-level parts

Progress towards #8
2015-06-08 12:09:34 +10:00
Angus Gratton
81afe58334 Change symbol extraction to use objdump not nm
nm outputs warnings to stderr so hard to clean output.

Also now picks up global variables, like NMIIrqOn.
2015-06-02 17:57:33 +10:00
Angus Gratton
c126fa6430 Add README, 'make help', header comments, Copyright notices 2015-06-02 17:12:20 +10:00
Angus Gratton
3fcec6106f Swap binary axTLS libssl for direct compiled version 2015-06-02 17:12:20 +10:00
Angus Gratton
e743d03a78 Preprocess all binary SDK symbols to add an sdk_ prefix
* This fixes the problem of axTLS symbols hmac_md5/hmac_sha1 having same
  name as symbols in libwpa (which have incompatible signatures)

* Also allows for easier identification and piece-by-piece removal of
  binary functions.

* Some libc symbols are not renamed, list is in lib/symbols_norename.txt
2015-06-02 15:08:35 +10:00
Angus Gratton
b8576dd554 Fix errno 2015-06-02 15:08:35 +10:00
Angus Gratton
dc4ca6861f Remove udhcp (DHCP server support) as it's a GPL violation :( 2015-06-02 15:08:35 +10:00
Angus Gratton
8e174aa518 Comment vPortEnterCritical/vPortExitCritical functions 2015-06-02 15:08:35 +10:00
Angus Gratton
806962d5c7 Replace lwip SDK blob with lwip 1.4.1 upstream source
Compiles but won't work yet
2015-06-02 15:08:26 +10:00
Angus Gratton
1e15cc266f Comment some parts of portmacro.h 2015-05-07 14:23:24 +10:00
Angus Gratton
c636adf42c Clean up portmacro.h 2015-05-07 14:23:24 +10:00
Angus Gratton
3a5b46a09a Xtensa interrupt management function prototypes 2015-05-07 14:23:24 +10:00
Angus Gratton
6369b4cefa Clean up rest of port.c function 2015-05-07 14:23:24 +10:00
Angus Gratton
ee95fde5ec Change PendSV function signature to use enum 2015-05-07 14:23:24 +10:00
Angus Gratton
c3c531240e Remove pending sv posted flag, double-setting int bit doesn't matter 2015-05-07 14:23:24 +10:00
Angus Gratton
e95a93bdd9 Clean up PendSV/SV ISR 2015-05-07 14:23:24 +10:00
Angus Gratton
ddd88dbe59 Misc port.c cleanup, remove now-unused PortxxxInt_NoNest, comment misc bits of blob interface 2015-05-07 14:23:24 +10:00
Angus Gratton
b7e0e232dd Replace FreeRTOS core/non-portable files with unmodified variants from vanilla 7.5.2 2015-05-07 14:23:24 +10:00
Angus Gratton
de4855b86c First half of moving custom synchronisation primitive API to standard FreeRTOS 2015-05-07 14:23:24 +10:00
Angus Gratton
b3c674d89d Swap memory management to FreeRTOS-style, fixed heap size 2015-05-07 14:23:24 +10:00