[Oct 09] Stock Android 7.1.2 (20180921) - RockPro64 | [Sept 25] KDE Neon (20180917) - Pinebook / Slackware Aarch64 Miniroot (20180901) - ROCK64 | [Aug 6] Debian Stretch Minimal 64bit (0.7.8) / Ubuntu 18.04 Bionic LXDE Desktop Image (0.7.8) / Ubuntu 18.04 Bionic minimal 64bit / 32bit Image (0.7.8) / Ubuntu 18.04 Bionic Containers Image (0.7.8) / Stretch OpenMediaVault OS Image armhf / Stretch OpenMediaVault OS Image arm64 ( 0.7.8) - ROCK64

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


ARM mbed
#1
I've read multiple times that ARM mbed is to be supported, but I found no news of progress (or if it's done). Is this still being worked on?
Reply
#2
as far as mbed hardware platforms go, this is the most complete list i have read,
https://os.mbed.com/platforms/
why the padi is not listed is anybody's guess.
Reply
#3
Try this link: https://os.mbed.com/platforms/Realtek-RTL8195AM/

The PADI is a RTL8710AF, but based on my understanding this is just a cut down version of the RTL8195AM. They seem to use the same SDK for Arduino and GCC so you can probably use the ARM mbed environment by setting the target to the RTL8195AM chip. That said the RTL8710AF does not support all the features of the full chip and you may have to modify the config file slightly.
Reply
#4
There is a pull in mbed's github that does add support for RTL8710AF target (PADI IoT Stamp).

I have been playing with it, trying to get it working for a while and finally managed to get mbed-os-example-wifi working last night.

I will post more information.

Issues that needed to be addressed:
1/ Compiler has to be an old GCC ARM 4.8.3 (current version 6.3.1 will compile, but PADI will crash immediately, I gave v5.4.1 try too, which somewhat works, but still crashes, maybe when certain ROM functions are called...)
2/ mbed generates a binary file for CMSIS-DAP mass storage upload DAPLINK - which, unless you have got the right adapter, won't work. I had to build an image that can be used with JTAG/SWD uploading method using OpenOCD/ JLink.
Reply
#5
(10-04-2018, 01:30 PM)kissste Wrote: There is a pull in mbed's github that does add support for RTL8710AF target (PADI IoT Stamp).

I have been playing with it, trying to get it working for a while and finally managed to get mbed-os-example-wifi working last night.

I will post more information.

Issues that needed to be addressed:
1/ Compiler has to be an old GCC ARM 4.8.3 (current version 6.3.1 will compile, but PADI will crash immediately, I gave v5.4.1 try too, which somewhat works, but still crashes, maybe when certain ROM functions are called...)
2/ mbed generates a binary file for CMSIS-DAP mass storage upload DAPLINK - which, unless you have got the right adapter, won't work. I had to build an image that can be used with JTAG/SWD uploading method using OpenOCD/ JLink.

Glad that you have make the mbed OS works on PADI IoT stamp.

Please share more of your experience and post more info. Thanks.
Reply
#6
Mbed OS folks are in the process of refactoring REALTEK_RTL8195AM into MCU_ target and then PINE/RTL8710AF will inherit/ extended that.

https://github.com/ARMmbed/mbed-os/pull/...-427923144

It should go into 5.11.0-rc1 which will then need a patch.

My experiment were on the (current mbed-os-5.9 - might be previous at this time) master plus pull 7965 (which will have to be refactored as a result of pull 8266)
https://github.com/ARMmbed/mbed-os/pull/7965

[email protected]:~/mbed-os-example-wifi/mbed-os$ git branch
mbed-os-5.9
* pr-7965


Installation steps:
1/ Fetch Mbed OS master

2/ Apply pull 7965
git fetch origin pull/7965/head:pr-7965
git checkout pr-7965

3/ set env
mbed config target REALTEK_RTL8710AF
mbed toolchain GCC_ARM
mbed config GCC_ARM_PATH /home/steve/.arduino15/packages/realtek/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/

4/ Install Ameba 2.0.5 for Arduino or SDK 3.4, 3.5 or 4.0 - what we need is 4.8.3 gcc compiler

5/ Install pvvx's rtlaimage.py, from his RTLDUINO project

6/ openocd/ jlink flash write tools from one of pvvx's RTL8710 projects

7/ Modifications to mbed-os:

os-example-wifi$ mbed status

[mbed] Status for "mbed-os":
M targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8XXXA/device/TOOLCHAIN_GCC_ARM/TARGET_RTL8710A/rtl8710a.ld
M targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8XXXA/device/TOOLCHAIN_GCC_ARM/rtl8195a_rom.h
M targets/targets.json
M tools/targets/REALTEK_RTL8195AM.py

7/ Modification to rtlaimage.py - add mbed sections/obj names.

Building and running:
a/ mbed compile

b/ generate compatible images
python rtlaimage.py -r -a -o ./ ~/mbed-os-example-wifi/BUILD/REALTEK_RTL8710AF/GCC_ARM/mbed-os-example-wifi.elf

c/ upload - ram, or to image2 or ota
./JLink-RunRAM.sh
or
./JLinkGDB_OTA.sh
or....

Status:
Sometimes it runs fine, sometime freezes when running on the chip, not sure why, might be running at 166MHz (RTL8195 setup) instead of standard (for RTL8710) 83MHz. I have got HT7333 regulator and 1000uF capacitor (power should be OK).
Reply
#7
(10-08-2018, 03:32 PM)kissste Wrote: Mbed OS folks are in the process of refactoring REALTEK_RTL8195AM into MCU_ target and then PINE/RTL8710AF will inherit/ extended that.

https://github.com/ARMmbed/mbed-os/pull/...-427923144

It should go into 5.11.0-rc1 which will then need a patch.

My experiment were on the (current mbed-os-5.9 - might be previous at this time) master plus pull 7965 (which will have to be refactored as a result of pull 8266)
https://github.com/ARMmbed/mbed-os/pull/7965

[email protected]:~/mbed-os-example-wifi/mbed-os$ git branch
 mbed-os-5.9
* pr-7965


Installation steps:
1/ Fetch Mbed OS master

2/ Apply pull 7965
git fetch origin pull/7965/head:pr-7965
git checkout pr-7965

3/ set env
mbed config target REALTEK_RTL8710AF
mbed toolchain GCC_ARM
mbed config GCC_ARM_PATH /home/steve/.arduino15/packages/realtek/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/

4/ Install Ameba 2.0.5 for Arduino or SDK 3.4, 3.5 or 4.0 - what we need is 4.8.3 gcc compiler

5/ Install pvvx's rtlaimage.py, from his RTLDUINO project

6/ openocd/ jlink flash write tools from one of pvvx's RTL8710 projects

7/ Modifications to mbed-os:

os-example-wifi$ mbed status

[mbed] Status for "mbed-os":
M targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8XXXA/device/TOOLCHAIN_GCC_ARM/TARGET_RTL8710A/rtl8710a.ld
M targets/TARGET_Realtek/TARGET_AMEBA/TARGET_RTL8XXXA/device/TOOLCHAIN_GCC_ARM/rtl8195a_rom.h
M targets/targets.json
M tools/targets/REALTEK_RTL8195AM.py

7/ Modification to rtlaimage.py - add mbed sections/obj names.

Building and running:
a/ mbed compile

b/ generate compatible images
python rtlaimage.py -r -a -o ./ ~/mbed-os-example-wifi/BUILD/REALTEK_RTL8710AF/GCC_ARM/mbed-os-example-wifi.elf

c/ upload - ram, or to image2 or ota
./JLink-RunRAM.sh
or
./JLinkGDB_OTA.sh
or....

Status:
Sometimes it runs fine, sometime freezes when running on the chip, not sure why, might be running at 166MHz (RTL8195 setup) instead of standard (for RTL8710) 83MHz. I have got HT7333 regulator and 1000uF capacitor (power should be OK).

thanks on the write up. May be due to ruuunig at 166Mhz as you stated. Anyway lowering back to 88MHz?
Reply
#8
Update: No luck so far.

This is the example, that I'm trying to run:
https://github.com/ARMmbed/mbed-os-examp...r/main.cpp

Steps:
A/ prints to console
B/ inits wifi
C/ scans wifi
D/ connects to wifi

I have tried multiple bootloaders that I have found (there are versions out there, have not tried all of them yet).

Based on the latest one, which sets CPU clock to 83.333Mhz before jump to the image, the problem might be in mbed's generated code (need to dig there).

1/ mbed's RTL8195 supplied bootloader
- partition signature is OK, jumps there and freezes, to even console output

2/ RTL's SDK4.0a GCC supplied bootloader
- partition signature is OK, jumps there and prints to console (A), inits wifi (B) and freezes on scan © but managed to output sometimes.

3/ PVVX's RTL00MP3 github repo and RTL00_WEB github repo
- partition signature is OK, jumps there and prints to console (A), freezes wifi (B), sometimes gets to © but ever rarely output scan results
- one of these bootloaders explicity set 83.333MHz CPU freq and calibrates/populates calibrated SPI params.

What PVVX wrote on the subject of bootloader (in russian, use google translate):
https://esp8266.ru/forum/threads/rtl871x...ader.2142/

P.S.1: I have tried multiple PADI's just in case trouble is with hardware,

P.S.2: Interesting (found out by an accident): Lowering voltage to 3.1xV from 3.30V appears to makes it running longer. This indicates - again clock speed.

P.S.3: I might have not mentioned before: Compiler has to be from gcc-arrm-none-eabi version 4.8.3
but!! GDB must be from a recent gcc-arm-non-eabi version otherwise openocd flasher from SDK4.0 error's out and won't flash...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)