mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #15535 from aabadie/pr/tools/lpc2k_pgm
tools/lpc2k_pgm: refactor build system integration
This commit is contained in:
commit
2dc5a69939
4
.github/workflows/tools-buildtest.yml
vendored
4
.github/workflows/tools-buildtest.yml
vendored
@ -67,3 +67,7 @@ jobs:
|
||||
uses: aabadie/riot-action@v1
|
||||
with:
|
||||
cmd: make -C dist/tools/fixdep
|
||||
- name: Build lpc2k_pgm tool
|
||||
uses: aabadie/riot-action@v1
|
||||
with:
|
||||
cmd: make -C dist/tools/lpc2k_pgm
|
||||
|
@ -1,26 +1,13 @@
|
||||
BOARDS_COMMON_MSBA2_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
# Compile `lpc2k_pgm` when required
|
||||
# It is still compiling in `boards` as it was the case before introducing the
|
||||
# rule to autobuild
|
||||
MSBA2_TOOLS = $(BOARDS_COMMON_MSBA2_DIR)/tools
|
||||
LPC2K_PGM = $(MSBA2_TOOLS)/bin/lpc2k_pgm
|
||||
$(LPC2K_PGM): FORCE
|
||||
env -i PATH=$(PATH) $(MAKE) -C $(MSBA2_TOOLS)
|
||||
FLASHDEPS += $(if $(findstring $(LPC2K_PGM),$(FLASHER)),$(LPC2K_PGM))
|
||||
|
||||
FLASHER ?= $(LPC2K_PGM)
|
||||
|
||||
# configure serial interface
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
# This does not make a lot of sense, but it has the same value as the previous code
|
||||
PORT_DARWIN ?= /dev/tty.usbserial-ARM
|
||||
|
||||
# Use lpc2k_pgm programmer
|
||||
PROGRAMMER ?= lpc2k_pgm
|
||||
|
||||
# when using miniterm set RTS and DTR lines to 0, otherwise the board is reset
|
||||
MINITERMFLAGS += --rts 0 --dtr 0
|
||||
|
||||
PYTERMFLAGS += -tg
|
||||
include $(RIOTMAKE)/tools/serial.inc.mk
|
||||
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
FFLAGS = $(PROG_DEV) $(FLASHFILE)
|
||||
|
3
dist/tools/externc/check.sh
vendored
3
dist/tools/externc/check.sh
vendored
@ -18,7 +18,8 @@ cd $RIOTBASE
|
||||
ROOT=$(git rev-parse --show-toplevel)
|
||||
EXIT_CODE=0
|
||||
|
||||
FILES=$(FILEREGEX='\.h$' changed_files)
|
||||
EXCLUDE='^(dist/tools/)'
|
||||
FILES=$(FILEREGEX='\.h$' EXCLUDE=${EXCLUDE} changed_files)
|
||||
|
||||
# check files
|
||||
for FILE in ${FILES}; do
|
||||
|
@ -1,4 +1,4 @@
|
||||
CFLAGS += -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
|
||||
CFLAGS = -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
|
||||
CC = gcc
|
||||
prefix=/usr/local
|
||||
|
@ -16,6 +16,9 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef BOOT_H
|
||||
#define BOOT_H
|
||||
|
||||
/**
|
||||
* @brief structure to hold boot partition
|
||||
*/
|
||||
@ -24,3 +27,5 @@ typedef struct {
|
||||
int size; /**< size of partition */
|
||||
const int *prog; /**< partition data */
|
||||
} boot_t;
|
||||
|
||||
#endif /* BOOT_H */
|
@ -16,5 +16,10 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef BOOT_23XX_H
|
||||
#define BOOT_23XX_H
|
||||
|
||||
/* automatically generated from boot_23xx.armasm */
|
||||
extern const unsigned int boot_23xx[];
|
||||
|
||||
#endif /* BOOT_23XX_H */
|
@ -16,5 +16,10 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef BOOT_2XXX_H
|
||||
#define BOOT_2XXX_H
|
||||
|
||||
/* automatically generated from boot_2xxx.armasm */
|
||||
extern const unsigned int boot_2xxx[];
|
||||
|
||||
#endif /* BOOT_2XXX_H */
|
@ -16,6 +16,9 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef CHIPINFO_H
|
||||
#define CHIPINFO_H
|
||||
|
||||
extern char *lpc_return_strings[];
|
||||
|
||||
/**
|
||||
@ -41,3 +44,5 @@ struct chip_info_struct {
|
||||
};
|
||||
|
||||
extern struct chip_info_struct chip_info[];
|
||||
|
||||
#endif /* CHIPINFO_H */
|
@ -16,6 +16,9 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef DOWNLOAD_H
|
||||
#define DOWNLOAD_H
|
||||
|
||||
extern int download_begin(char *file);
|
||||
extern void soft_reboot_begin(void);
|
||||
extern void hard_reset_to_bootloader(void);
|
||||
@ -24,3 +27,5 @@ extern void download_cancel(const char *mesg);
|
||||
extern void download_rx_term(const unsigned char *buf, int num);
|
||||
extern void download_rx_port(const unsigned char *buf, int num);
|
||||
extern void download_timer(void);
|
||||
|
||||
#endif /* DOWNLOAD_H */
|
@ -16,6 +16,11 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef GUI_H
|
||||
#define GUI_H
|
||||
|
||||
extern void create_window(int *argc, char ***argv);
|
||||
extern void run_gui(void);
|
||||
extern void done_program(int still_in_bootloader);
|
||||
|
||||
#endif /* GUI_H */
|
@ -16,6 +16,8 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef SETTINGS_H
|
||||
#define SETTINGS_H
|
||||
|
||||
extern void init_settings(void);
|
||||
extern const char *file_setting(void);
|
||||
@ -28,3 +30,5 @@ extern void new_baud_setting(const char *new_baud);
|
||||
extern void new_crystal_setting(const char *new_xtal);
|
||||
|
||||
extern char *baud_list[];
|
||||
|
||||
#endif /* SETTINGS_H */
|
@ -16,5 +16,10 @@
|
||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef UUENCODE_H
|
||||
#define UUENCODE_H
|
||||
|
||||
extern void uuencode(char *str, const unsigned char *data, int num);
|
||||
extern int uudecode(const char *str, unsigned char *data, int max);
|
||||
|
||||
#endif /* UUENCODE_H */
|
8
makefiles/tools/lpc2k_pgm.inc.mk
Normal file
8
makefiles/tools/lpc2k_pgm.inc.mk
Normal file
@ -0,0 +1,8 @@
|
||||
# Compile `lpc2k_pgm` when required
|
||||
LPC2K_PGM = $(RIOTTOOLS)/lpc2k_pgm/bin/lpc2k_pgm
|
||||
FLASHDEPS += $(LPC2K_PGM)
|
||||
|
||||
FLASHER ?= $(LPC2K_PGM)
|
||||
|
||||
FLASHFILE ?= $(HEXFILE)
|
||||
FFLAGS ?= $(PROG_DEV) $(FLASHFILE)
|
@ -44,3 +44,8 @@ $(RIOTTOOLS)/flatc/flatc: $(RIOTTOOLS)/flatc/Makefile
|
||||
@echo "[INFO] flatc binary not found - building it from source now"
|
||||
$(MAKE) -C $(RIOTTOOLS)/flatc
|
||||
@echo "[INFO] flatc binary successfully built!"
|
||||
|
||||
$(RIOTTOOLS)/lpc2k_pgm/bin/lpc2k_pgm: $(RIOTTOOLS)/lpc2k_pgm/Makefile
|
||||
@echo "[INFO] lpc2k_pgm binary not found - building it from source now"
|
||||
@$(MAKE) -C $(RIOTTOOLS)/lpc2k_pgm
|
||||
@echo "[INFO] lpc2k_pgm binary successfully built!"
|
||||
|
Loading…
Reference in New Issue
Block a user