Commit graph

20 commits

Author SHA1 Message Date
Angus Gratton
1b22cc088e Add initial mbedTLS and HTTPS example project (using howsmyssl.com JSON API)
mbedTLS version 2.1.0 (current stable)

Has some known issues/hacks:
* Entropy source not hooked in at all
* Linker script has a messy hack in it to store some (not all) data in
  irom
2015-09-20 21:13:38 +10:00
Angus Gratton
f230fbcd65 Move start of IROM0 to 0x40220000, save 128kB of flash
Old starting point left 256kB for RAM sections, but I think they
shouldn't ever possibly exceed 128kB.
2015-09-20 21:13:38 +10:00
Michael Jacobsen
372827ac42 Mostly updated header files for use in C++ 2015-09-20 21:13:38 +10:00
Angus Gratton
ac0a947453 Merge branch 'master' into experiments/unaligned_load 2015-09-10 08:19:42 +10:00
Alex Stewart
c30f48c3b1 Fix linker script handling of irom/irom0 segments 2015-08-27 13:54:30 -07:00
Angus Gratton
25e124a612 ld: Link memmove into IRAM (used by sprintf, etc.) 2015-08-10 11:54:30 +10:00
Angus Gratton
19b8383069 Working TFTP server based OTA updates
Tested with 16MBit flash configuration, two rboot update slots.

Closes #10
2015-08-05 14:10:14 +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
87dc2317f5 Support building an OTA-compatible flash image
Image is suitable for SDK v1.2 bootloader or rBoot.
2015-07-21 15:27:19 +10:00
Angus Gratton
a566a51c09 Use linker scripts rather than libcirom/objcopy tricks to arrange
IRAM/IROM sections.

esp-open-rtos compiled code: .text goes into irom by default, symbols
explicitly marked with IRAM attribute go into iram.

SDK code: .text goes into iram by default, symbols marked with
ICACHE_FLASH_ATTR go into irom.

libgcc functions also go into iram by default.
2015-07-09 13:58:41 +10:00
Angus Gratton
a3c4469b1f Add a linker script comment for all the patched newlib _lock_xxx symbols 2015-06-16 16:34:13 +10:00
Angus Gratton
b7b16de429 Alias ets_printf directly to printf at link time
I thought maybe ets_printf had some special properties, but it doesn't
seem to have any so far.
2015-06-16 16:22:55 +10:00
Angus Gratton
93dc7edead Grow linker script irom section for 512KB flash chip
Necessary to fit http_get_ssl example, newlib string functions are
larger than espressif SDK implementations.
2015-06-16 14:23:47 +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
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
a476fb007e Fix IROM macro 2015-06-08 17:58:10 +10:00
Angus Gratton
a173ffa81d Remove custom entry point, pending merge of esptool.py patch adding --entry-symbol option 2015-06-03 14:29:56 +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
1ffbc303ff Working variant of esp_iot_rtos_sdk (files from commit ec75c85f9ef53) 2015-05-07 14:22:25 +10:00