-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:bakerstu/openmrn into bracz-pom-d…
…ebug * 'master' of github.com:bakerstu/openmrn: Adds POM commands to the dcc debug print routine. (#589) Refactor bootloader client application (#588) Adds bootloader application for STM32-F091 (#587)
- Loading branch information
Showing
20 changed files
with
1,280 additions
and
585 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...ications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/BootloaderHal.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../boards/st-stm32f091rc-nucleo/BootloaderHal.cxx |
1 change: 1 addition & 0 deletions
1
...ications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/BootloaderHal.hxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../boards/st-stm32f0x1_x2_x8-generic/BootloaderHal.hxx |
64 changes: 64 additions & 0 deletions
64
applications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
APP_PATH ?= $(realpath ../..) | ||
-include $(APP_PATH)/config.mk | ||
-include local_config.mk | ||
|
||
OPENMRNPATH ?= $(shell \ | ||
sh -c "if [ \"X`printenv OPENMRNPATH`\" != \"X\" ]; then printenv OPENMRNPATH; \ | ||
elif [ -d /opt/openmrn/src ]; then echo /opt/openmrn; \ | ||
elif [ -d ~/openmrn/src ]; then echo ~/openmrn; \ | ||
elif [ -d ../../../src ]; then echo ../../..; \ | ||
else echo OPENMRNPATH not found; fi" \ | ||
) | ||
|
||
-include $(OPENMRNPATH)/etc/config.mk | ||
LINKCORELIBS = -lopenlcb -lutils | ||
|
||
include $(OPENMRNPATH)/etc/stm32cubef0.mk | ||
|
||
CFLAGSEXTRA += -DSTM32F091xC | ||
CXXFLAGSEXTRA += -DSTM32F091xC | ||
SYSLIBRARIES += -lfreertos_drivers_stm32cubef091xc | ||
OPENOCDARGS = -f board/st_nucleo_f0.cfg | ||
|
||
export TARGET := bare.armv6m | ||
|
||
include $(OPENMRNPATH)/etc/prog.mk | ||
|
||
ifndef DEFAULT_ADDRESS | ||
DEFAULT_ADDRESS=0xff | ||
endif | ||
|
||
include $(OPENMRNPATH)/etc/node_id.mk | ||
|
||
SYSLIB_SUBDIRS= | ||
OBJEXTRA= | ||
LDFLAGSEXTRA += -nostartfiles | ||
|
||
all: $(EXECUTABLE).bin | ||
|
||
# How to use: make multibin ADDRESS=0x20 ADDRHIGH=0x45 NUM=3 | ||
# starting address, high bits (user range), count | ||
multibin: | ||
for i in $$(seq 1 $(NUM)) ; do $(MAKE) $(EXECUTABLE).bin ADDRESS=$$(printf 0x%02x $$(($(ADDRESS)+$$i))) ; cp $(EXECUTABLE).bin $(EXECUTABLE).$(MCU_SHORT).$$(printf %02x%02x $(ADDRHIGH) $$(($(ADDRESS)+$$i-1))).bin ; done | ||
|
||
ifeq ($(call find_missing_deps,OPENOCDPATH OPENOCDSCRIPTSPATH),) | ||
|
||
flash: $(EXECUTABLE)$(EXTENTION) $(EXECUTABLE).bin $(EXECUTABLE).lst | ||
@if ps ax -o comm | grep -q openocd ; then echo openocd already running. quit existing first. ; exit 1 ; fi | ||
$(GDB) $< -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "monitor reset halt" -ex "load" -ex "monitor reset init" -ex "monitor reset run" -ex "detach" -ex "quit" | ||
|
||
lflash: $(EXECUTABLE).bin $(EXECUTABLE).lst | ||
@if ps ax -o comm | grep -q openocd ; then echo openocd already running. quit existing first. ; exit 1 ; fi | ||
$(GDB) $< -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "monitor reset halt" -ex "monitor program $< 0x08000000 verify reset exit" -ex "monitor reset run" -ex "detach" -ex "quit" | ||
|
||
gdb: | ||
@if ps ax -o comm | grep -q openocd ; then echo openocd already running. quit existing first. ; exit 1 ; fi | ||
$(GDB) $(EXECUTABLE)$(EXTENTION) -ex "target remote | $(OPENOCDPATH)/openocd -c \"gdb_port pipe\" --search $(OPENOCDSCRIPTSPATH) $(OPENOCDARGS)" -ex "continue" # -ex "monitor reset halt" | ||
|
||
else | ||
|
||
flash gdb: | ||
echo OPENOCD not found ; exit 1 | ||
|
||
endif | ||
|
15 changes: 15 additions & 0 deletions
15
applications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/NodeId.cxx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#include "openlcb/If.hxx" | ||
#include "address.h" | ||
|
||
#ifndef NODEID_HIGH_BITS | ||
#define NODEID_HIGH_BITS 0x18 | ||
#endif | ||
|
||
extern const openlcb::NodeID NODE_ID; | ||
const openlcb::NodeID NODE_ID = 0x050101010000ULL | (NODEID_HIGH_BITS << 8) | NODEID_LOW_BITS; | ||
extern const uint16_t DEFAULT_ALIAS; | ||
const uint16_t DEFAULT_ALIAS = 0x400 | NODEID_LOW_BITS; | ||
|
||
//#define BOOTLOADER_STREAM | ||
//#define BOOTLOADER_DATAGRAM | ||
//#include "openlcb/Bootloader.hxx" |
1 change: 1 addition & 0 deletions
1
...tions/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/bootloader_startup.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../boards/st-stm32f0x1_x2_x8-generic/bootloader_startup.c |
1 change: 1 addition & 0 deletions
1
applications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/memory_map.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../boards/st-stm32f091rc-nucleo/memory_map.ld |
1 change: 1 addition & 0 deletions
1
applications/bootloader/targets/bare.armv6m.st-stm32f091rc-nucleo-dev-board/target.ld
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../boards/st-stm32f0x1_x2_x8-generic/bootloader.ld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletion
17
applications/bootloader_client/targets/js.emscripten/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,18 @@ | ||
-include ../../config.mk | ||
include $(OPENMRNPATH)/etc/prog.mk | ||
LDFLAGS += --bind | ||
LDFLAGS += --bind -s WASM=0 | ||
|
||
|
||
# How to prepare for releasing this: | ||
# as administrator do | ||
# npm install -g pkg | ||
# then you can call make release | ||
release: | ||
pkg -C Brotli . | ||
|
||
|
||
clean: clean-wasm | ||
|
||
|
||
clean-wasm: | ||
rm -f $(EXECUTABLE).{wasm,wast} |
Oops, something went wrong.