mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-12-14 03:23:15 +00:00
Merge branch 'Pascal' into master
This commit is contained in:
@@ -16,7 +16,9 @@ multistm32f103c.pid.0=0x0004
|
||||
multistm32f103c.build.variant=generic_stm32f103c
|
||||
multistm32f103c.build.vect=VECT_TAB_ADDR=0x8000000
|
||||
multistm32f103c.build.core=maple
|
||||
|
||||
multistm32f103c.build.board=MULTI_STM32_FLASH_FROM_TX=103
|
||||
|
||||
multistm32f103c.upload.use_1200bps_touch=false
|
||||
multistm32f103c.upload.file_type=bin
|
||||
multistm32f103c.upload.auto_reset=true
|
||||
@@ -42,10 +44,12 @@ multistm32f103c.menu.upload_method.TxFlashMethod.upload.tool=tx_upload
|
||||
multistm32f103c.menu.upload_method.TxFlashMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
|
||||
multistm32f103c.menu.upload_method.TxFlashMethod.build.vect=VECT_TAB_ADDR=0x8002000
|
||||
multistm32f103c.menu.upload_method.TxFlashMethod.build.ldscript=ld/bootloader_20.ld
|
||||
|
||||
multistm32f103c.menu.upload_method.TxFlashMethod.bootloader.file=Multi4in1/StmMultiBoot.bin
|
||||
|
||||
multistm32f103c.menu.upload_method.DFUUploadMethod=Upload via USB
|
||||
multistm32f103c.menu.upload_method.DFUUploadMethod.build.board=MULTI_STM32_NO_BOOT=103
|
||||
|
||||
multistm32f103c.menu.upload_method.DFUUploadMethod.upload.protocol=maple_dfu
|
||||
multistm32f103c.menu.upload_method.DFUUploadMethod.upload.tool=maple_upload
|
||||
multistm32f103c.menu.upload_method.DFUUploadMethod.build.upload_flags=-DSERIAL_USB -DGENERIC_BOOTLOADER
|
||||
@@ -61,4 +65,6 @@ multistm32f103c.menu.upload_method.serialMethod.upload.tool=serial_upload
|
||||
multistm32f103c.menu.upload_method.serialMethod.build.upload_flags=-DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG
|
||||
multistm32f103c.menu.upload_method.serialMethod.build.board=MULTI_STM32_NO_BOOT=103
|
||||
|
||||
|
||||
|
||||
##############################################################
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
#
|
||||
# Customized for the STM32 multi 4-in-1 board.
|
||||
# Based on an STM32F103CB MCU.
|
||||
@@ -6,6 +7,7 @@
|
||||
# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification
|
||||
|
||||
name=Multi 4-in-1 STM32
|
||||
|
||||
version=1.0.3
|
||||
|
||||
compiler.warning_flags=-w -DDEBUG_LEVEL=DEBUG_NONE
|
||||
@@ -48,6 +50,7 @@ build.hs_flag=
|
||||
build.upload_flags=
|
||||
build.extra_flags= {build.upload_flags} {build.cpu_flags} {build.hs_flag} {build.common_flags}
|
||||
|
||||
|
||||
# These can be overridden in platform.local.txt
|
||||
compiler.c.extra_flags=
|
||||
compiler.c.elf.extra_flags="-L{build.variant.path}/ld"
|
||||
@@ -56,6 +59,7 @@ compiler.S.extra_flags=
|
||||
compiler.ar.extra_flags=
|
||||
compiler.elf2hex.extra_flags=
|
||||
|
||||
|
||||
compiler.libs.c.flags="-I{build.system.path}/libmaple" "-I{build.system.path}/libmaple/include" "-I{build.system.path}/libmaple/stm32f1/include" "-I{build.system.path}/libmaple/usb/stm32f1" "-I{build.system.path}/libmaple/usb/usb_lib"
|
||||
|
||||
# USB Flags
|
||||
@@ -99,6 +103,7 @@ recipe.size.regex.data=^(?:\.data|\.bss|\.noinit)\s+([0-9]+).*
|
||||
## Save Compiled Binary
|
||||
recipe.output.tmp_file={build.project_name}.bin
|
||||
#recipe.output.save_file={build.project_name}.{build.variant}.bin
|
||||
|
||||
recipe.output.save_file=multi-stm.bin
|
||||
|
||||
## Copy hex
|
||||
@@ -114,6 +119,7 @@ recipe.hooks.savehex.postsavehex.01.pattern.linux="{runtime.platform.path}/tools
|
||||
recipe.hooks.savehex.postsavehex.01.pattern.linux64="{runtime.platform.path}/tools/linux64/do_version" "{build.path}" "{build.project_name}" "{build.source.path}" {build.board} EXPORT
|
||||
recipe.hooks.savehex.postsavehex.01.pattern.macosx="{runtime.platform.path}/tools/macosx/do_version" "{build.path}" "{build.project_name}" "{build.source.path}" {build.board} EXPORT
|
||||
|
||||
|
||||
# Uploader tools
|
||||
# -------------------
|
||||
|
||||
|
||||
@@ -76,6 +76,7 @@ void *_sbrk(int incr) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
__weak int _open(const char *path __attribute__((unused)), int flags __attribute__((unused)), ...) {
|
||||
return 1;
|
||||
}
|
||||
@@ -85,10 +86,12 @@ __weak int _close(int fd __attribute__((unused))) {
|
||||
}
|
||||
|
||||
__weak int _fstat(int fd __attribute__((unused)), struct stat *st) {
|
||||
|
||||
st->st_mode = S_IFCHR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
__weak int _isatty(int fd __attribute__((unused))) {
|
||||
return 1;
|
||||
}
|
||||
@@ -98,6 +101,7 @@ __weak int isatty(int fd __attribute__((unused))) {
|
||||
}
|
||||
|
||||
__weak int _lseek(int fd __attribute__((unused)), off_t pos __attribute__((unused)), int whence __attribute__((unused))) {
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -106,13 +110,18 @@ __weak unsigned char getch(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
__weak int _read(int fd __attribute__((unused)), char *buf, size_t cnt __attribute__((unused))) {
|
||||
|
||||
|
||||
*buf = getch();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
__weak void putch(unsigned char c __attribute__((unused))) {
|
||||
|
||||
}
|
||||
|
||||
__weak void cgets(char *s, int bufsize) {
|
||||
@@ -155,7 +164,9 @@ __weak void cgets(char *s, int bufsize) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
__weak int _write(int fd __attribute__((unused)), const char *buf, size_t cnt) {
|
||||
|
||||
int i;
|
||||
|
||||
for (i = 0; i < cnt; i++)
|
||||
@@ -165,12 +176,16 @@ __weak int _write(int fd __attribute__((unused)), const char *buf, size_t cnt) {
|
||||
}
|
||||
|
||||
/* Override fgets() in newlib with a version that does line editing */
|
||||
|
||||
__weak char *fgets(char *s, int bufsize, void *f __attribute__((unused))) {
|
||||
|
||||
cgets(s, bufsize);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
__weak void _exit(int exitcode __attribute__((unused))) {
|
||||
|
||||
while (1)
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user