Commit graph

899 commits

Author SHA1 Message Date
Angus Gratton
265cef7e00 Add some LED debugging assembler macros
Not used directly in esp-open-rtos but useful to keep around.
2015-07-28 11:19:01 +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
4d91d4432e Merge pull request #14 from kanflo/master
Changed flashing order
2015-07-24 09:57:10 +10:00
Johan Kanflo
d4873379a9 Changed flashing order
Workaround for a ESP8266 ROM bug that cuases SPI flash erase
to sometimes erase an extra sector. See
https://github.com/themadinventor/esptool/issues/33
2015-07-23 14:13:07 +02:00
Angus Gratton
d4a503f320 Fix bug with blank OTA binary file name 2015-07-23 15:19:30 +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
5bbbc1f144 Run linker scripts via C preprocessor 2015-07-21 15:27:19 +10:00
Angus Gratton
c95369e86c emacs dir-locals.el: Only disable tabs in c-mode (Makefiles need tabs) 2015-07-21 15:26:11 +10:00
Angus Gratton
e0e7814856 Update README, including removing references to esp8266-wiki
Closes #9
2015-07-15 16:15:35 +10:00
Angus Gratton
86188c01fd Merge branch 'newlib' 2015-07-15 16:01:18 +10:00
Angus Gratton
689cf874b2 Provide our own newlib libc
Newlib 2.2.0 w/ nan ofeatures, xtensa patches, locking
implementation.

Built from https://github.com/projectgus/newlib-xtensa
branch xtensa-2_2_0-lock
commit daa6ae40cdc8099f54c3e68a586fc1b906169c5a

For more details, see:
https://github.com/SuperHouse/esp-open-rtos/wiki/libc-configuration

Closes #1
2015-07-15 15:17:59 +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
1d72ed3f70 Hardware timer support 2015-07-09 12:29:40 +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
5151ccc3b2 xtensa_interrupts: Add esync after writing intenable/intclear, add comment about non-interrupt-safe mask/unmask 2015-06-18 09:04:45 +10:00
Angus Gratton
2c1b1ab141 Minor core header cleanups 2015-06-18 09:04:45 +10:00
Angus Gratton
ad37abda8b blink examplpe: Fix FreeRTOSConfig mistake 2015-06-17 08:07:26 +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
8478dfd92f Examples: Rename main.c files to more descriptive file names 2015-06-16 16:59:32 +10:00
Angus Gratton
f0db6f2b98 WiFi Examples: Load SSID & password from a common local.h file instead
of coding into program
2015-06-16 16:58:27 +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
2e51f7b164 http_get_ssl example: Fix name of output elf file 2015-06-16 14:23:48 +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
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
1b0124cf05 Timer FRC1 & FRC2 registers
Mostly determined from reverse engineering and poking around.

Includes first "experiments" program with random bits and pieces for
poking at registers, may be useful to keep in source control but not
useful for writing actual programs.
2015-06-12 17:05:54 +10:00
Angus Gratton
8f3111c5e1 Add local.mk to gitignore 2015-06-12 10:40:35 +10:00
Angus Gratton
b4cbd2712e Makefile tweaks for xxx_SRC_FILES search path & error reporting 2015-06-12 10:27:14 +10:00
Angus Gratton
685a48583a Change 'TARGET' in makefiles to 'PROGRAM', keep consistent with documentation terminology 2015-06-12 10:26:02 +10:00
Angus Gratton
47a7bb1952 blink example: Remove stray gpio_enable call 2015-06-12 09:57:32 +10:00
Angus Gratton
f7c4b6d550 Dependencies: Rebuild component if its makefile changes, or if common.mk/local.mk changes 2015-06-12 09:51:25 +10:00
Angus Gratton
f34e229bbc Allow specifying list of files in Makefiles as alternative to dirs
Also allow xx_EXTRA_SRC_FILES
Let target component use name TARGET so TARGET_EXTRA_SRC_FILES, TARGET_SRC_DIR, etc.
2015-06-12 08:12:47 +10:00
Angus Gratton
b3aa4eedd3 Change github URLs to use HTTPS not ssh
Thanks again to vic for pointing this out!
2015-06-12 07:44:16 +10:00
Angus Gratton
5e08256849 Add note about building esp-open-sdk with STANDALONE=n
(thanks vic on esp8266.com for pointing this out)
2015-06-12 07:42:44 +10:00
Angus Gratton
6a5866aa55 http examples: don't write NULs to sockets
Thanks @pfalcon for the heads-up.
2015-06-09 09:03:56 +10:00
Angus Gratton
c09167715e Indentation fixes
- Fix dir-locals so emacs won't inject occasional tabs to case statements.
- Fix stray tab indentation in example programs. (Thx @pfalcon for pointing this out)
2015-06-09 09:00:32 +10:00
Angus Gratton
a59b1565e4 Better comments on esp_gpio_interrupts.c 2015-06-08 18:33:56 +10:00
Angus Gratton
0078252df3 Add GPIO config, interrupt registers, GPIO interrupt support, 'button' example 2015-06-08 18:20:29 +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
a476fb007e Fix IROM macro 2015-06-08 17:58:10 +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
b01e7a89bd Rearrange make order so user program gets compiled first (most likely to have compiler error) 2015-06-05 15:35:04 +10:00
Angus Gratton
5cb37060cd Readme: Add third party libraries link and axTLS 2015-06-03 14:45:31 +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
1ee7222509 Add wiki link, clean up README a bit 2015-06-03 09:15:56 +10:00
Angus Gratton
1bfe1c5147 Fix makefile local.mk usage 2015-06-03 09:14:50 +10:00
Angus Gratton
4790654bc2 Add actual LICENSE file 2015-06-03 07:53:55 +10:00