File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ function(create_arduino_firmware_target TARGET_NAME BOARD_ID ALL_SRCS ALL_LIBS
136
136
${TARGET_NAME} .bin
137
137
COMMENT "Generating BIN image"
138
138
VERBATIM )
139
+ add_custom_command (TARGET ${TARGET_NAME} POST_BUILD
140
+ COMMAND bash ${CMAKE_SOURCE_DIR} /cmake/freeFrash.bash
141
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
142
+ COMMENT "Computing free flash "
143
+ VERBATIM )
139
144
#_get_board_property(${BOARD_ID} build.mcu MCU)
140
145
# Display target size
141
146
#add_custom_command(TARGET ${TARGET_NAME} POST_BUILD
Original file line number Diff line number Diff line change
1
+ export EEPROM=` grep " \.eeprom" * .map | sed ' s/.eeprom *//g' | sed ' s/ [ \t]*0x.*$//g' `
2
+ export TAIL=` grep 0x0000000008 * .map | sed ' s/^.*0x0000000008/0x0000000008/g' | sed ' s/ .*//g' | sort | grep -v ${EEPROM} | tail -1`
3
+ export FREE=$(( $EEPROM - $TAIL ))
4
+ echo " Tail : [$TAIL ] EEPROM [$EEPROM ] FREE ${FREE} "
5
+ printf " Free Flash = %d kB\n" $(( $FREE / 1024 ))
Original file line number Diff line number Diff line change @@ -3,3 +3,7 @@ rm -Rf STM32F1/patched*
3
3
git checkout STM32F1/boards.txt STM32F1/system/libmaple/stm32f1/include/series/stm32.h
4
4
git checkout STM32F1/variants/generic_stm32f103c/board.cpp
5
5
git checkout STM32F1/cores/maple/main.cpp
6
+ git checkout STM32F1/cores/maple/libmaple/i2c.c
7
+ git checkout STM32F1/cores/maple/libmaple/i2c_f1.c
8
+ git checkout STM32F1/libraries/SPI/src/SPI.cpp
9
+ git checkout STM32F1/libraries/SPI/src/SPI.h
You can’t perform that action at this time.
0 commit comments