OpenOCD makefile integration and Charger IC initialization fixes. (#258)

* Makefile: start openocd from gdb, boot no boot version.
* bq25896: reset before readout. Cleanup.
This commit is contained in:
あく
2020-12-04 20:30:50 +03:00
committed by GitHub
parent 884dba647a
commit 228055e4eb
11 changed files with 289 additions and 83 deletions

View File

@@ -5,7 +5,7 @@ FW_ADDRESS = 0x08008000
OS_OFFSET = 0x00008000
FLASH_ADDRESS = 0x08000000
DEBUG_AGENT = openocd -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32l4x.cfg -c "init" -c "adapter speed 4000"
OPENOCD_OPTS = -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32l4x.cfg -c "init" -c "adapter speed 4000"
BOOT_CFLAGS = -DBOOT_ADDRESS=$(BOOT_ADDRESS) -DFW_ADDRESS=$(FW_ADDRESS) -DOS_OFFSET=$(OS_OFFSET)
MCU_FLAGS = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard

View File

@@ -157,4 +157,4 @@ void target_switch2os() {
LL_GPIO_ResetOutputPin(LED_RED_PORT, LED_RED_PIN);
SCB->VTOR = BOOT_ADDRESS + OS_OFFSET;
target_switch((void*)(BOOT_ADDRESS + OS_OFFSET));
}
}

View File

@@ -5,7 +5,7 @@ FW_ADDRESS = 0x08008000
OS_OFFSET = 0x00008000
FLASH_ADDRESS = 0x08000000
DEBUG_AGENT = openocd -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32wbx.cfg -c "init" -c "adapter speed 4000"
OPENOCD_OPTS = -f interface/stlink.cfg -c "transport select hla_swd" -f target/stm32wbx.cfg -c "init" -c "adapter speed 4000"
BOOT_CFLAGS = -DBOOT_ADDRESS=$(BOOT_ADDRESS) -DFW_ADDRESS=$(FW_ADDRESS) -DOS_OFFSET=$(OS_OFFSET)
MCU_FLAGS = -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard