Comments (4)
Sorry for so late answer! Is this problem actual still?
from stm32-usb-bootloader.
It seems that CMake use default system compiler instead of gcc-arm-none-eabi. Ill try to reproduce this problem
from stm32-usb-bootloader.
Same problem here.
from stm32-usb-bootloader.
is not tested, because my target board uses SPI instead of SDIO, but i test to change
diff --git a/bootloader-usb/CMakeLists.txt b/bootloader-usb/CMakeLists.txt
index 46897ba..6b590c4 100644
--- a/bootloader-usb/CMakeLists.txt
+++ b/bootloader-usb/CMakeLists.txt
@@ -72,11 +72,28 @@ set(BIN_NAME ${PROJECT_NAME}.bin)
set(MAP_NAME ${PROJECT_NAME}.map)
set(LDSCRIPTS "-T STM32F103RETx_FLASH.ld")
-set(LDSCRIPTS_DIR "${PROJECT_SOURCE_DIR}/ldscripts")
+set(LDSCRIPTS_DIR "\"${PROJECT_SOURCE_DIR}\"/ldscripts")
+
+set(CMAKE_C_COMPILER arm-none-eabi-gcc CACHE STRING "Use arm-none-eabi-gcc as C compiller" FORCE)
+set(CMAKE_C_COMPILER_AR arm-none-eabi-gcc-ar CACHE STRING "Use arm-none-eabi-ar as C++ ar" FORCE)
+set(CMAKE_C_COMPILER_RANLIB arm-none-eabi-gcc-ranlib CACHE STRING "Use arm-none-eabi-ar as C++ ranlib" FORCE)
+set(CMAKE_CXX_COMPILER arm-none-eabi-g++ CACHE STRING "Use arm-none-eabi-g++ as C++ compiller" FORCE)
+set(CMAKE_CXX_COMPILER_AR arm-none-eabi-gcc-ar CACHE STRING "Use arm-none-eabi-gcc-ar as C++ ar" FORCE)
+set(CMAKE_CXX_COMPILER_RANLIB arm-none-eabi-gcc-ranlib CACHE STRING "Use arm-none-eabi-gcc-ar as C++ ranlib" FORCE)
+set(CMAKE_ASM_COMPILER arm-none-eabi-g++ CACHE STRING "Use arm-none-eabi-g++ as ASM compiller" FORCE)
+set(CMAKE_ASM_COMPILER_AR arm-none-eabi-gcc-ar CACHE STRING "Use arm-none-eabi-gcc-ar as ASM ar" FORCE)
+set(CMAKE_ASM_COMPILER_RANLIB arm-none-eabi-gcc-ranlib CACHE STRING "Use arm-none-eabi-ar as ASM ranlib" FORCE)
+
+set(CMAKE_ADDR2LINE arm-none-eabi-addr2line CACHE STRING "use arm-none-eabi-addr2line as addr2line" FORCE)
+set(CMAKE_AR arm-none-eabi-ar CACHE STRING "Use arm-none-eabi-ar as ar" FORCE)
+set(CMAKE_LINKER arm-none-eabi-ld CACHE STRING "Use arm-none-eabi-ld as linker" FORCE)
+set(CMAKE_NM arm-none-eabi-nm CACHE STRING "use arm-arm-none-eabi-nm as nm" FORCE)
+set(CMAKE_OBJCOPY arm-none-eabi-objcopy CACHE STRING "use arm-arm-none-eabi-objcopy as objcopy" FORCE)
+set(CMAKE_OBJDUMP arm-none-eabi-objdump CACHE STRING "use arm-arm-none-eabi-objdump as objdump" FORCE)
+set(CMAKE_RANLIB arm-none-eabi-ranlib CACHE STRING "use arm-arm-none-eabi-ranlib as ranlib" FORCE)
+set(CMAKE_READELF arm-none-eabi-readelf CACHE STRING "use arm-arm-none-eabi-readelf as readelf" FORCE)
+set(CMAKE_STRIP arm-none-eabi-strip CACHE STRING "use arm-arm-none-eabi-strip as strip" FORCE)
-set(CMAKE_C_COMPILER arm-none-eabi-gcc)
-set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
-set(CMAKE_ASM_COMPILER arm-none-eabi-g++)
# This two lines to avoid error
# arm-none-eabi-g++: error: unrecognized command line option '-rdynamic'
and now
but
[100%] Linking C executable usb-bootloader.elf
/usr/lib/gcc/arm-none-eabi/9.3.0/../../../../arm-none-eabi/bin/ld: usb-bootloader.elf section `.text' will not fit in region `FLASH'
/usr/lib/gcc/arm-none-eabi/9.3.0/../../../../arm-none-eabi/bin/ld: section .loader_state LMA [000000000807f800,000000000807f80f] overlaps section .text LMA [00000000080749e4,0000000008083653]
/usr/lib/gcc/arm-none-eabi/9.3.0/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 19512 bytes
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/usb-bootloader.elf.dir/build.make:843: usb-bootloader.elf] Error 1
make[2]: se sale del directorio '/home/sl1pkn07/aplicaciones/Creality Ender 3/stm32-usb-bootloader/bootloader-usb'
make[1]: *** [CMakeFiles/Makefile2:93: CMakeFiles/usb-bootloader.elf.dir/all] Error 2
make[1]: se sale del directorio '/home/sl1pkn07/aplicaciones/Creality Ender 3/stm32-usb-bootloader/bootloader-usb'
make: *** [Makefile:101: all] Error 2
from stm32-usb-bootloader.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stm32-usb-bootloader.