Commit graph

47 commits

Author SHA1 Message Date
Angus Gratton
f585ed8f46 Rename GPIO_CONF_PUSH_PULL to GPIO_CONF_OPEN_DRAIN
Seems I got the functionality of this bit inverted when
initially testing.

In testing it also seems open drain mode is ignored on some pins, which
still source current. Needs more investigation though (may be pullups
internal to the ESP modules or set by default in software.)

Relates to #45
2015-09-12 16:21:26 +10:00
Angus Gratton
d5141b3077 iomux: Fix setting of invalid bits when masking in iomux fields
Fixes regression from 2a939e97

Part of issue #45
2015-09-12 15:23:42 +10:00
Angus Gratton
c55cfd3b2e Merge branch 'fix/int32_t'
Closes #42
2015-09-09 16:23:31 +10:00
Angus Gratton
1221e2117b Rework component makefiles to have a default <component>_ROOT
This fixes a long-standing bug where build directories sometimes
expanded many levels deeper than they should have.

Component names can now no longer contains slashes (ie the component
name for 'extras/i2c' is now just 'i2c')
2015-09-08 09:59:59 +10:00
Angus Gratton
e61e84ca7d libc: Redefine int32_t/uint32_t as 'int' not 'long'
libc built from projectgus/newlib-xtensa@0077776963

Closes #42
2015-09-05 13:37:00 +10:00
Angus Gratton
5aa095298d libc syscalls: ENOSYS implementations for open,fstat,close,lseek
Closes #41
2015-09-03 11:45:52 +10:00
Angus Gratton
006c73c7ba libc read()/write() syscalls - return EBADF if fd is not stdin/stdout as applicable
As discussed in #41

Also fixes indent in _read_r
2015-09-03 11:34:54 +10:00
Alex Stewart
78be94744c Fix broken UART(i) definition 2015-08-25 22:31:47 -07:00
Alex Stewart
0155632dd3 Remove 'packed' attribute from all regs structs 2015-08-25 17:13:13 -07:00
Alex Stewart
b76bf99d7c Remove unnecessary AND for VAL2FIELD macro
Added VAL2FIELD_M / SET_FIELD_M for rare cases when there might actually be some need for it.
2015-08-25 17:07:06 -07:00
Angus Gratton
76ad427dc2 Merge pull request #29 from foogod/issue_8
Add more *_regs.h definitions
2015-08-24 16:14:19 +10:00
Angus Gratton
08bb9f16e7 Add a comment explaining commented out REG_BASE lines
Change was part of #27
2015-08-22 17:39:25 +10:00
Alex Stewart
9f3f3e5b08 Add esp/rtcmem_regs.h 2015-08-21 14:20:00 -07:00
Alex Stewart
b482a1cc77 Fix a couple of struct def issues with 2 previous commits 2015-08-21 14:06:38 -07:00
Alex Stewart
3f3f257612 Add more regs to esp/dport_regs.h
Added a bunch of definitions based on info in http://esp8266-re.foogod.com/wiki/Memory_Map#dport0
2015-08-21 13:59:20 -07:00
Alex Stewart
af32217805 Add esp/uart_regs.h and esp/spi_regs.h 2015-08-21 13:56:23 -07:00
Alex Stewart
d79c1c3983 rename GPIO_CONF_DRIVER_ENABLE back to GPIO_CONF_PUSH_PULL 2015-08-21 09:54:20 -07:00
Alex Stewart
13b924d259 Fix leftover IOMUX_FUNC_A/D references 2015-08-19 16:53:02 -07:00
Alex Stewart
0d6af96f2d Cleanup a few comments in *_regs.h files 2015-08-19 16:50:56 -07:00
Alex Stewart
c32a6692a0 Add esp/wdt_regs.h 2015-08-19 16:48:11 -07:00
Alex Stewart
eaa090e267 Added esp/timer_regs.h and esp/dport_regs.h 2015-08-19 11:34:18 -07:00
Alex Stewart
3cc5d1fa86 Replace stdint.h with esp/types.h in gpio_regs.h 2015-08-19 09:05:03 -07:00
Alex Stewart
5e6b022e39 Fix cut-paste error in gpio_regs.h comment 2015-08-19 09:03:18 -07:00
Alex Stewart
7fa2817f1b Add esp/gpio_regs.h 2015-08-18 22:46:25 -07:00
Alex Stewart
9727df5f6c Add esp/iomux_regs.h 2015-08-18 17:38:31 -07:00
Johan Kanflo
3bacab7c67 Correct prototype for sdk_uart_rx_one_char, kudos to @foogod 2015-08-07 13:26:06 +02:00
Angus Gratton
bed6907d22 Exception vector address must be 256 byte aligned
Not actually a problem with the current linker script as the address is
predetermined there at start of IRAM, but might as well be accurate
about it.

As per advice from @foogod on esp8266-re mailing list:
https://groups.google.com/d/msg/esp8266-re/1ljIY3Zttbo/HvzHSWOLCgAJ
2015-08-06 09:54:46 +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
aed843fc14 exception_vectors: Remove some cruft some the symbol table 2015-07-30 10:10:37 +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
28fdebee92 gpio: Change gpio_write argument to bool 2015-07-29 10:35:15 +10:00
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
86188c01fd Merge branch 'newlib' 2015-07-15 16:01:18 +10:00
Angus Gratton
1d72ed3f70 Hardware timer support 2015-07-09 12:29:40 +10:00
Angus Gratton
2c1b1ab141 Minor core header cleanups 2015-06-18 09:04:45 +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
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
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
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