0
I installed and configured mbed-cli for Linux, following the official documentation. I can compile and flash the code to micro controller but the output isn't working (not even serial print), but it is working if I compile and flash using mac-OS in a macbook).
I tried updating the version and reinstalling too. All my configurations match the screenshots of the documentation.
Compilation output:
WARNING: MBED_ARM_PATH set as environment variable but doesn't exist
Building project xxxx_v1 (LPC1768, GCC_ARM)
.
.
.
Filling region application with ./BUILD/LPC1768/GCC_ARM/xxxx_v1_application.bin
.
.
.
Image: ./BUILD/LPC1768/GCC_ARM/xxxx_v1.bin
Config list output:
[mbed] Global config:
GCC_ARM_PATH=/usr/bin
ARM_PATH=home/xxxxteam/ARM_Compiler_5.06u6
[mbed] Local config (/home/xxxxteam/Documents/MBED/xxxx_v1):
TOOLCHAIN=GCC_ARM
TARGET=LPC1768
Code to flash into SD card:
#mbed compile -m LPC1768 -t GCC_ARM
cd BUILD/LPC1768/GCC_ARM/
rm firmware.bin
mv xxxx_v1_application.bin firmware.bin
rm $1/*.bin
cp firmware.bin $1
umount $1
first argument in above code is 'media/xxxxteam/xxxxcycle'
Even a simple code of printing hello world is not working.
Source is the same, but compiler is different? I couple of possibilities: maybe crt (C runtime, startup code) differs; maybe one of the compilers initialises something, the other doesn't; maybe built-in libraries differ; maybe your code has some
#ifdef
for specific compilers. I would go for the simplest possible working piece of code (just a blinky?), and compare compiled binaries with disassembler - hopefully something stands out. – domen – 2019-04-10T08:25:20.857Will do that and test, Thanks. – ElecTron – 2019-04-10T09:59:41.503