kopia lustrzana https://github.com/solokeys/solo1
memory org and solo hacker build recipe
rodzic
cbf021c7a8
commit
b9ebde22e5
|
@ -1,20 +1,26 @@
|
|||
ifndef DEBUG
|
||||
DEBUG=0
|
||||
endif
|
||||
|
||||
all:
|
||||
$(MAKE) -f application.mk -j8 solo.hex
|
||||
$(MAKE) -f application.mk -j8 solo.hex DEBUG=$(DEBUG)
|
||||
|
||||
debug:
|
||||
$(MAKE) -f application.mk -j8 solo.hex DEBUG=1
|
||||
all-hacker:
|
||||
$(MAKE) -f application.mk -j8 solo.hex EXTRA_DEFINES='-DSOLO_HACKER'
|
||||
|
||||
debugboot-app:
|
||||
$(MAKE) -f application.mk -j8 solo.hex DEBUG=1 \
|
||||
LDSCRIPT=linker/stm32l4xx_extra.ld EXTRA_DEFINES='-DAPPLICATION_START_PAGE=16'
|
||||
LDSCRIPT=linker/stm32l4xx_extra.ld EXTRA_DEFINES='-DAPPLICATION_START_PAGE=16 -DSOLO_HACKER'
|
||||
|
||||
debugboot-boot:
|
||||
$(MAKE) -f bootloader.mk -j8 bootloader.hex DEBUG=1 \
|
||||
LDSCRIPT=linker/bootloader_stm32l4xx_extra.ld EXTRA_DEFINES='-DAPPLICATION_START_PAGE=16'
|
||||
LDSCRIPT=linker/bootloader_stm32l4xx_extra.ld EXTRA_DEFINES='-DAPPLICATION_START_PAGE=16 -DSOLO_HACKER'
|
||||
|
||||
boot:
|
||||
$(MAKE) -f bootloader.mk -j8 bootloader.hex
|
||||
$(MAKE) -f bootloader.mk -j8 bootloader.hex DEBUG=$(DEBUG)
|
||||
|
||||
boot-hacker:
|
||||
$(MAKE) -f bootloader.mk -j8 bootloader.hex EXTRA_DEFINES='-DSOLO_HACKER'
|
||||
|
||||
clean:
|
||||
$(MAKE) -f application.mk clean
|
||||
|
@ -28,7 +34,7 @@ flash: solo.hex bootloader.hex
|
|||
flash_dfu: solo.hex bootloader.hex
|
||||
python merge_hex.py solo.hex bootloader.hex all.hex
|
||||
# STM32_Programmer_CLI -c port=usb1 -halt -e all --readunprotect
|
||||
STM32_Programmer_CLI -c port=usb1 -halt -d all.hex
|
||||
STM32_Programmer_CLI -c port=usb1 -halt -rdu -d all.hex
|
||||
|
||||
flashboot: solo.hex bootloader.hex
|
||||
python merge_hex.py solo.hex bootloader.hex all.hex
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
|
||||
#define IS_BOOTLOADER 1
|
||||
|
||||
#define SOLO_HACKER
|
||||
|
||||
#define ENABLE_U2F_EXTENSIONS
|
||||
// #define ENABLE_U2F
|
||||
|
||||
|
@ -53,6 +51,7 @@ void hw_init(void);
|
|||
void device_reboot();
|
||||
|
||||
int is_authorized_to_boot();
|
||||
int is_bootloader_disabled();
|
||||
void bootloader_heartbeat();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
|
|||
/* Specify the memory areas */
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 14K
|
||||
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 20K
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
|
||||
SRAM2 (rw) : ORIGIN = 0x10000000, LENGTH = 16K
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ _Min_Stack_Size = 0x400; /* required amount of stack */
|
|||
MEMORY
|
||||
{
|
||||
/* First 14 KB is bootloader */
|
||||
FLASH (rx) : ORIGIN = 0x08003800, LENGTH = 204K-8 /* Leave out 38 Kb at end for data */
|
||||
FLASH (rx) : ORIGIN = 0x08005000, LENGTH = 198K-8 /* Leave out 38 Kb at end for data */
|
||||
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
|
||||
SRAM2 (rw) : ORIGIN = 0x10000000, LENGTH = 16K
|
||||
}
|
||||
|
|
|
@ -13,11 +13,6 @@
|
|||
|
||||
#define BOOT_TO_DFU 0
|
||||
|
||||
// Uncomment SOLO_HACKKER to Only use level 1 read-out-protection,
|
||||
// allows booting to ST bootloader or Solo bootloader without any button press,
|
||||
// Disables signature check in Solo bootloader.
|
||||
#define SOLO_HACKER
|
||||
|
||||
//#define USING_DEV_BOARD
|
||||
|
||||
//#define ENABLE_U2F_EXTENSIONS
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
// Start of application code
|
||||
#ifndef APPLICATION_START_PAGE
|
||||
#define APPLICATION_START_PAGE (7)
|
||||
#define APPLICATION_START_PAGE (10)
|
||||
#endif
|
||||
#define APPLICATION_START_ADDR (0x08000000 + ((APPLICATION_START_PAGE)*PAGE_SIZE))
|
||||
|
||||
|
@ -31,6 +31,6 @@
|
|||
#define APPLICATION_END_ADDR ((0x08000000 + ((APPLICATION_END_PAGE)*PAGE_SIZE))-8)
|
||||
|
||||
// Bootloader state.
|
||||
#define AUTH_WORD_ADDR ((0x08000000 + ((APPLICATION_END_PAGE)*PAGE_SIZE))-8)
|
||||
#define AUTH_WORD_ADDR (APPLICATION_END_ADDR)
|
||||
|
||||
#endif
|
||||
|
|
Ładowanie…
Reference in New Issue