Skip to content

Commit

Permalink
Build H.bin or H4.bin depend from board
Browse files Browse the repository at this point in the history
Remove dead code
  • Loading branch information
DiSlord Live committed Jan 10, 2023
1 parent 83b7cd1 commit c60f20a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ endif
#

# Define project name here
PROJECT = ch
ifeq ($(TARGET),F303)
PROJECT = H4
else
PROJECT = H
endif

# Imported source files and paths
#CHIBIOS = ../ChibiOS-RT
Expand Down Expand Up @@ -265,7 +269,7 @@ ULIBS = -lm
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk

flash: build/ch.bin
flash: build/build/$(PROJECT).bin

This comment has been minimized.

Copy link
@Ho-Ro

Ho-Ro Jan 10, 2023

Contributor

change
flash: build/build/$(PROJECT).bin
to
flash: build/$(PROJECT).bin

dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin

This comment has been minimized.

Copy link
@Ho-Ro

Ho-Ro Jan 10, 2023

Contributor

change
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/ch.bin
to
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/$(PROJECT).bin


dfu:
Expand Down
2 changes: 1 addition & 1 deletion NANOVNA_STM32_F072/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void __early_init(void) {
// set msp for system memory
__set_MSP(SYSTEM_BOOT_MSP);
// jump to system memory
( (void (*)(void)) (*((uint32_t *)(STM32F072xB_SYSTEM_MEMORY+4))) )();
((void (*)(void))(*((uint32_t *)(STM32F072xB_SYSTEM_MEMORY + 4))))();
while (1);
}

Expand Down
6 changes: 3 additions & 3 deletions NANOVNA_STM32_F072/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
*/
#define STM32F072xB

#define STM32F072xB_SYSTEM_MEMORY 0x1FFFC800
#define STM32F072xB_SYSTEM_MEMORY 0x1FFFC800
#define BOOT_FROM_SYTEM_MEMORY_MAGIC_ADDRESS 0x20003FF0
#define BOOT_FROM_SYTEM_MEMORY_MAGIC 0xDEADBEEF
#define SYSTEM_BOOT_MSP 0x20002250
#define BOOT_FROM_SYTEM_MEMORY_MAGIC 0xDEADBEEF
#define SYSTEM_BOOT_MSP 0x20002250

/*
* IO pins assignments
Expand Down
4 changes: 2 additions & 2 deletions NANOVNA_STM32_F303/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ const PALConfig pal_default_config = {
#endif

void boardDFUEnter(void) {
__set_MSP(SYSTEM_BOOT_MSP);
( (void (*)(void)) (*((uint32_t *)(STM32F303xC_SYSTEM_MEMORY + 4))) )(); // jump to DFU
__set_MSP(*((uint32_t *)(STM32F303xC_SYSTEM_MEMORY)));
((void (*)(void))(*((uint32_t *)(STM32F303xC_SYSTEM_MEMORY + 4))))(); // jump to DFU
}

/*
Expand Down
8 changes: 3 additions & 5 deletions NANOVNA_STM32_F303/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@
*/
#define STM32F303xC

#define STM32F303xC_SYSTEM_MEMORY 0x1FFFD800
#define BOOT_FROM_SYTEM_MEMORY_MAGIC_ADDRESS 0x20009FF0
#define BOOT_FROM_SYTEM_MEMORY_MAGIC 0xDEADBEEF
//#define SYSTEM_BOOT_MSP *(uint32_t *)0 // 0x20001258
#define SYSTEM_BOOT_MSP 0x20001258
#define STM32F303xC_SYSTEM_MEMORY 0x1FFFD800
#define BOOT_FROM_SYTEM_MEMORY_MAGIC_ADDRESS 0x20009FFC
#define BOOT_FROM_SYTEM_MEMORY_MAGIC 0xDEADBEEF

/*
* IO pins assignments
Expand Down
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static uint16_t p_sweep = 0;
float measured[2][SWEEP_POINTS_MAX][2];

#undef VERSION
#define VERSION "1.2.18"
#define VERSION "1.2.19"

// Version text, displayed in Config->Version menu, also send by info command
const char *info_about[]={
Expand Down

0 comments on commit c60f20a

Please sign in to comment.