UPDATE!
I'm absolutely not a chibios or esp32 expert, but I have had a bit of a poke at it and done an initial ESP32 commit, copied from MSP430X as that's a known small example, and code and compiler settings modified until the toolchain can build something.
This is absolutely not gonna work on an esp32, but it's enough to prove that we have a working xtensa-esp32-elf-* toolchain that can build at least the testhal/ESP32/ESP32DOITDEVKITV1/ADC/ example, and a basic layout of folders we might be able to follow.
In short, I basically commented out all the msp430 assembler bits that aren't valid esp32 assembler, dug around on the internet for enough plausible linker bits ( from espressif's IDF for freertos or whatever ), and messed with the Makefile and headers and code in testhal/ESP32/ESP32DOITDEVKITV1/ADC/ and elsewhere till the thing compiled. I consider that a success, a very , very hacky one.
https://github.com/davidbuzz/ChibiOS-Co ... /esp32-wip
ESP32
-
- Posts: 1
- Joined: Thu Dec 07, 2017 3:58 pm
- Been thanked: 2 times
Re: ESP32
Hello,
I've just finished a port for ESP8266. I used code nosdk8266 as a start, more info at:
https://github.com/cnlohr/nosdk8266
For development I've used code::blocks ide and Espressif-ESP8266-DevKit-v2.1.0-x86, so unfortunately there is no makefile at all.
Main system clock frequency is hardcoded at 80MHz and uart is at 115200.
The board that drives it is ESP-01.
Things that work:
- timer interrupt (assumption is that only timer interrupt can be used)
- led blinking
- partially printf function from on-chip rom (there is a problem with printing more chars at once, couldn't find why)
- code is executed only from ram
Things to do:
- clean up the code, refactor, to make it look more ChibiOS-like
- make "real" exceptions and interrupts handlers
- hal, serial, gpio drivers
- spi flash support for code execution
- more...
I attach example project with led blinking.
Skroob
I've just finished a port for ESP8266. I used code nosdk8266 as a start, more info at:
https://github.com/cnlohr/nosdk8266
For development I've used code::blocks ide and Espressif-ESP8266-DevKit-v2.1.0-x86, so unfortunately there is no makefile at all.
Main system clock frequency is hardcoded at 80MHz and uart is at 115200.
The board that drives it is ESP-01.
Things that work:
- timer interrupt (assumption is that only timer interrupt can be used)
- led blinking
- partially printf function from on-chip rom (there is a problem with printing more chars at once, couldn't find why)
- code is executed only from ram
Things to do:
- clean up the code, refactor, to make it look more ChibiOS-like
- make "real" exceptions and interrupts handlers
- hal, serial, gpio drivers
- spi flash support for code execution
- more...
I attach example project with led blinking.
Skroob
- Attachments
-
- chibios_xtensa_lx106.zip
- (845.73 KiB) Downloaded 891 times
- Giovanni
- Site Admin
- Posts: 14535
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1098 times
- Been thanked: 934 times
- Contact:
Re: ESP32
hi Giovanni, my Interest was in getting ArduPilot to run on a ESP32 hardware. Fundamentally this meant either port the higher-level application and it's HAL to the different pre-existing "freertos" that already runs on the esp32 , or port the existing "chibios" rtos that ArduPilot already uses to a new cpu etc. ( what this thread discussed ).
1 - ArduPilot-ArduHAL-ChibiOS-hardware (the way ArduPilot runs on most STM32 boards, and what this thread was about )
2 - Ardupilot-ArduHAL-FreeRTOS-hardware ( what we ended up doing , because insufficient knowledge to port chibios to new architechture.)
fyi, the current code where we have the majority of ArduPilot running on esp32/freertos is here:
https://github.com/sh83/ardupilot/commits/esp32
1 - ArduPilot-ArduHAL-ChibiOS-hardware (the way ArduPilot runs on most STM32 boards, and what this thread was about )
2 - Ardupilot-ArduHAL-FreeRTOS-hardware ( what we ended up doing , because insufficient knowledge to port chibios to new architechture.)
fyi, the current code where we have the majority of ArduPilot running on esp32/freertos is here:
https://github.com/sh83/ardupilot/commits/esp32
Re: ESP32
Maybe someone will be interested in a inexpensive wifi chip w600 with cortex m3 cpu - http://www.winnermicro.com/en/html/1/156/158/497.html. I think it’s easier to port Chibios on it. Some sources for it here - https://github.com/w600. It also has GDB debugging, it works fine with J-Link OB.
Who is online
Users browsing this forum: No registered users and 1 guest