Skip to content

Commit decaad7

Browse files
committed
Update instructions
1 parent f0831d0 commit decaad7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mbed-os-to-arduino

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export BOARDNAME=DISCO_F429ZI
2-
export ARDUINOCORE=~/ArduinoCore-mbed/variant/$BOARDNAME/
2+
export ARDUINOCORE=~/ArduinoCore-mbed/variants/$BOARDNAME/
33

44
mbed new mbed-os-program
55
cd mbed-os-program
@@ -17,11 +17,13 @@ gron ./BUILD/$BOARDNAME/GCC_ARM/.profile-cxx | grep json.flags | cut -f2 -d"\""
1717
gron ./BUILD/$BOARDNAME/GCC_ARM/.profile-ld | grep json.flags | cut -f2 -d"\"" > $ARDUINOCORE/ldflags.txt
1818

1919
arm-none-eabi-ar rcs BUILD/mbed-core-$BOARDNAME.a `xargs -n 1 < ./BUILD/$BOARDNAME/GCC_ARM/.link_options.txt | grep "\.o" | grep -v "main.o"`
20+
cp BUILD/mbed-core-$BOARDNAME.a $ARDUINOCORE/libs/libmbed.a
2021
cd mbed-os && find . | grep "\.h" | xargs -I % cp --parents % $ARDUINOCORE/../../cores/arduino/mbed
21-
cd BUILD && find . | grep "\.h" | xargs -I % cp % $ARDUINOCORE/../../cores/arduino/mbed
22+
#cd BUILD && find . | grep "\.h" | xargs -I % cp % $ARDUINOCORE/../../cores/arduino/mbed
23+
cp ./BUILD/$BOARDNAME/GCC_ARM/.link_script.ld $ARDUINOCORE/linker_script.ld
2224

23-
# find a way to extract PinNames.h and device.h
24-
# patch Callback.h
25+
# ~find a way to extract PinNames.h and device.h~
26+
# ~patch Callback.h~
2527
# copy linker script (eg. BUILD/DISCO_F429ZI/GCC_ARM/.link_script.ld)
2628

2729
openocd -f interface/stlink-v2.cfg -f target/stm32f4x_stlink.cfg -c "init" -c "reset init" -c "halt" -c "flash write_image erase ./BUILD/$BOARDNAME/GCC_ARM/mbed-os-program.elf" -c "verify_image ./BUILD/$BOARDNAME/GCC_ARM/mbed-os-program.elf" -c "reset run" -c shutdown

0 commit comments

Comments
 (0)