-
Notifications
You must be signed in to change notification settings - Fork 1
/
mcuSelect.cmake
42 lines (41 loc) · 1.87 KB
/
mcuSelect.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# We ony enable usb for arm and non small footprint
IF(NOT DEFINED LN_ARCH)
IF(1) # ARM
IF(USE_GD32F3)
SET(LN_ARCH "ARM" CACHE INTERNAL "")
SET(LN_MCU "M4" CACHE INTERNAL "")
SET(LN_MCU_FLASH_SIZE 256 CACHE INTERNAL "")
SET(LN_MCU_RAM_SIZE 46 CACHE INTERNAL "")
SET(LN_MCU_STATIC_RAM 5 CACHE INTERNAL "")
SET(LN_MCU_SPEED 96000000 CACHE INTERNAL "") #=> ok
# SET(LN_MCU_SPEED 72000000 CACHE INTERNAL "") #=> ok
SET(LN_SPEC "picolibc" CACHE INTERNAL "") # if not set we use nano
SET(LN_BOOTLOADER_SIZE 0 CACHE INTERNAL "")
ELSE()
SET(LN_ARCH "ARM" CACHE INTERNAL "")
SET(LN_MCU "M3" CACHE INTERNAL "")
SET(LN_MCU_RAM_SIZE 20 CACHE INTERNAL "")
IF(USE_SMALLFOOTPRINT)
SET(LN_MCU_STATIC_RAM 3 CACHE INTERNAL "")
SET(LN_MCU_FLASH_SIZE 64 CACHE INTERNAL "")
SET(LN_MCU_EEPROM_SIZE 2 CACHE INTERNAL "")
ELSE() # "Big" flash
SET(LN_MCU_STATIC_RAM 4 CACHE INTERNAL "")
SET(LN_MCU_FLASH_SIZE 128 CACHE INTERNAL "")
SET(LN_MCU_EEPROM_SIZE 4 CACHE INTERNAL "")
SET(LN_BOOTLOADER_SIZE 0 CACHE INTERNAL "")
ENDIF()
SET(LN_SPEC "picolibc" CACHE INTERNAL "") # if not set we use nano
ENDIF()
ELSE() # RISCV
SET(LN_ARCH "RISCV" CACHE INTERNAL "")
SET(LN_MCU "VF103" CACHE INTERNAL "")
SET(LN_MCU_SPEED 108000000 CACHE INTERNAL "")
SET(LN_MCU_RAM_SIZE 32 CACHE INTERNAL "")
SET(LN_MCU_FLASH_SIZE 128 CACHE INTERNAL "")
SET(LN_SPEC "picolibc" CACHE INTERNAL "") # if not set we use nano
#SET(LN_MCU_SPEED 96000000 CACHE INTERNAL "")
#SET(LN_MCU_SPEED 72000000 CACHE INTERNAL "")
ENDIF()
ENDIF(NOT DEFINED LN_ARCH)
MESSAGE(STATUS "Architecture ${LN_ARCH}, MCU=${LN_MCU}")