Build libopencm3
This commit is contained in:
parent
244fdbc35c
commit
07bae3f5f6
@ -26,9 +26,9 @@ add_executable(usbtest src/main.c src/util.c)
|
||||
|
||||
set_target_properties(usbtest PROPERTIES SUFFIX .elf)
|
||||
|
||||
#add_custom_target(libopencm3 make TARGETS=stm32/f1 -j8 WORKING_DIRECTORY ${LIBOPENCM3_DIR})
|
||||
add_custom_target(libopencm3 make TARGETS=stm32/f1 -j8 WORKING_DIRECTORY ${LIBOPENCM3_DIR})
|
||||
#link_directories(${LIBOPENCM3_DIR}/lib)
|
||||
#target_link_libraries(usbtest PUBLIC ${LIBOPENCM3_DIR}/lib/libopencm3_stm32f1.a)
|
||||
target_link_libraries(usbtest PUBLIC ${LIBOPENCM3_DIR}/lib/libopencm3_stm32f1.a)
|
||||
|
||||
add_subdirectory(RTT)
|
||||
target_link_libraries(usbtest PUBLIC RTT)
|
||||
|
10
README.md
10
README.md
@ -8,13 +8,17 @@ First time:
|
||||
|
||||
or older cmake:
|
||||
|
||||
2. `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=toolchain-STM32F1.cmake`
|
||||
2. `cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=toolchain-STM32F1.cmake -G Ninja`
|
||||
|
||||
And then to build an `.elf`
|
||||
### Build libopencm3
|
||||
|
||||
0. `cmake --build build --verbose`
|
||||
cmake --build build --verbose -t libopencm3
|
||||
|
||||
|
||||
### Build project elf
|
||||
|
||||
cmake --build build --verbose
|
||||
|
||||
## RTT debug console
|
||||
|
||||
run this while `openocd` is running
|
||||
|
Loading…
Reference in New Issue
Block a user