Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years ago.
mbed library build - mismatch with online compiler
The offline compiled mbed library gives error during compiling the program.
Requirement: Need to build mbed library offline so that source files can be edited.
Steps done:
1. Add Analog In example project in online compiler for STM32F767ZI -> Export program to Keil uVision -> Build successful and program works perfectly on STM32F767ZI.
2. Download mbed-os from github, install build tools and build library using command - "python build.py -m NUCLEO_F767ZI -t ARM".
The build is successful and mbed library is built inside ..\BUILD folder.
3. Replace "mbed" directory (which contains library files) in the project from step 1. with the compiled mbed library from step 2. Means, the online generated library is replaced with the offline one.
When the example program is built again, I get error - "Error: L6218E: Undefined symbol adc_read (referred from mbed/TARGET_NUCLEO_F767ZI/TOOLCHAIN_ARM_STD/analogin_api.o)."
Note that the library files (inside folder "mbed") from online compiler in step 1. are look alike the ones from step 2 (offline compiled). However, the size of few *.o files such as "..\mbed\TARGET_NUCLEO_F767ZI\TOOLCHAIN_ARM_STD\analogin_api.o" are different. For example, in step 1 the file size is 10kb and in step 2, it is 8kb.
I tried the same with compiler GCC_ARM also, but same result - the size of library files compiled offline is little less than the online one.
When I do object dump for both the online and offline libraries, I see that few functions are not linked correctly in offline project.
In short, I would like to know how "https://os.mbed.com/users/mbed_official/code/mbed/" is built?