ESP32
Re: ESP32
I'd be interested in ChibiOS on the esp8266 as well as the esp32 - maybe we could do both at the same time? Or do the differences make that impractical ie we really need to treat them as two totally separate ports?
-
- Posts: 1
- Joined: Mon Feb 26, 2018 7:07 am
Re: ESP32
I am not experienced in very low level coding of RTOS. But I have been working on ESP32 running freeRTOS for long time. I would be happy to help for this porting process.
- Giovanni
- Site Admin
- Posts: 14526
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1095 times
- Been thanked: 934 times
- Contact:
Re: ESP32
So lets start from the start
We need:
1) Core documentation, for the "port layer".
2) Compiler, is GCC available? something else? is it available also for Linux?
Giovanni
We need:
1) Core documentation, for the "port layer".
2) Compiler, is GCC available? something else? is it available also for Linux?
Giovanni
Re: ESP32
59page datasheet is here, including memory map, clocks, ram, pin descriptions, block diagram, and links to other good resources etc)
http://espressif.com/sites/default/file ... eet_en.pdf
More details here:
https://www.espressif.com/en/products/h ... 2/overview
C and c++ compiler definitely available, as this chip already runs FreeRTOS etc and has a port of the Arduino Libraries that is fully featured.
I recommend we start by targeting a well known dev board with an esp32 on it, such as the esp-vroom-32 'devkit v1' .
http://espressif.com/sites/default/file ... eet_en.pdf
More details here:
https://www.espressif.com/en/products/h ... 2/overview
C and c++ compiler definitely available, as this chip already runs FreeRTOS etc and has a port of the Arduino Libraries that is fully featured.
I recommend we start by targeting a well known dev board with an esp32 on it, such as the esp-vroom-32 'devkit v1' .
Re: ESP32
details of gcc available:
xtensa-esp32-elf-* for linux here: https://dl.espressif.com/doc/esp-idf/la ... setup.html
( windows is also available at a similar place).
xtensa-esp32-elf/bin$ ./xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-73-ge28a011) 5.2.0
xtensa-esp32-elf-* for linux here: https://dl.espressif.com/doc/esp-idf/la ... setup.html
( windows is also available at a similar place).
xtensa-esp32-elf/bin$ ./xtensa-esp32-elf-gcc --version
xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-73-ge28a011) 5.2.0
Re: ESP32
I'd just like to also point out that as I understand it, the "hard" part of a port to a new chip is the context switching ( because the chibios wiki says so ).... and this particular goal ( getting it running on esp32) can benefit heavily from the fact that freeRTOS already runs on the chip, and is already open source, and already does context switching successfully, and is MIT licensed, and thus "GPL compatible" from a license perspective, and so it's proposal that the freertos code be referenced and used freely as much as convenient to achieve this goal, and the resulting code can still be GPLv3 licensed.
references:
https://www.esp32.com/viewtopic.php?t=4296
https://www.freertos.org/a00114.html
https://www.gnu.org/licenses/license-li ... leLicenses
please let me know if anyone disagrees, as IANAL.
references:
https://www.esp32.com/viewtopic.php?t=4296
https://www.freertos.org/a00114.html
https://www.gnu.org/licenses/license-li ... leLicenses
please let me know if anyone disagrees, as IANAL.
- Giovanni
- Site Admin
- Posts: 14526
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1095 times
- Been thanked: 934 times
- Contact:
Re: ESP32
ChibiOS does context switching differently, not sure if we can use that as reference. In ChibiOS context switch is synchronous and performed within a critical section, only function-preserved registers are switched (port_intctx structure). The other registers are placed into a port_extctx structure which is only saved by ISRs.
What is needed for a port are:
1) Manual of the core architecture (registers, instruction set, exceptions management, stacks etc).
2) ABI of the compiler (registers used for parameters, return values, function-trashed registers, etc).
What needs to be defined are:
- Format of the port_intctx and port_extctx structures.
- How critical sections are implemented (it could be disabling IRQs in its simplest way).
- Conventions for ISRs.
- Assembler thread startup code.
- Assembler context switch code.
- Vectors table.
- Startup files.
See the PowerPC port for a "simple" example.
Giovanni
What is needed for a port are:
1) Manual of the core architecture (registers, instruction set, exceptions management, stacks etc).
2) ABI of the compiler (registers used for parameters, return values, function-trashed registers, etc).
What needs to be defined are:
- Format of the port_intctx and port_extctx structures.
- How critical sections are implemented (it could be disabling IRQs in its simplest way).
- Conventions for ISRs.
- Assembler thread startup code.
- Assembler context switch code.
- Vectors table.
- Startup files.
See the PowerPC port for a "simple" example.
Giovanni
Re: ESP32
Hi,
This was also on my todo/wish list if I have some free time i’d also like to contribute! Nice to see there are more people interested.
I did the Tiva port long time ago. That one was based on the already existing Cortex-M4 port, so it was mostly writing HAL. Context switching will be most tricky I think.
Marco
This was also on my todo/wish list if I have some free time i’d also like to contribute! Nice to see there are more people interested.
I did the Tiva port long time ago. That one was based on the already existing Cortex-M4 port, so it was mostly writing HAL. Context switching will be most tricky I think.
Marco
- Giovanni
- Site Admin
- Posts: 14526
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1095 times
- Been thanked: 934 times
- Contact:
Re: ESP32
I just created the forum (icon missing), moving this topic there.
Anybody volunteering as moderator? not much to do anyway, usually I cut problems "at the root".
Giovanni
Anybody volunteering as moderator? not much to do anyway, usually I cut problems "at the root".
Giovanni
Re: ESP32
Giovanni wrote:I just created the forum (icon missing), moving this topic there.
Anybody volunteering as moderator? not much to do anyway, usually I cut problems "at the root".
Giovanni
I’m not working at the moment so I have the time potentially. What’s involved in moderation?
Who is online
Users browsing this forum: No registered users and 1 guest