Skip to content

Commit ad45037

Browse files
committed
TEST: add Murata ABZ module
1 parent 4318192 commit ad45037

15 files changed

+866
-3
lines changed

boards.txt

+40-1
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,43 @@ nano33ble.bootloader.tool=openocd
102102
nano33ble.bootloader.extra_action.preflash=nrf5 mass_erase
103103
nano33ble.bootloader.config=-f target/nrf52.cfg
104104
nano33ble.bootloader.programmer=-f interface/cmsis-dap.cfg
105-
nano33ble.bootloader.file=nano33ble/bootloader.hex
105+
nano33ble.bootloader.file=nano33ble/bootloader.hex
106+
107+
##############################################################
108+
109+
nanowan.name=Arduino Nano WAN
110+
nanowan.build.core=arduino
111+
nanowan.build.crossprefix=arm-none-eabi-
112+
nanowan.build.compiler_path={runtime.tools.arm-none-eabi-gcc.path}/bin/
113+
114+
nanowan.build.variant=MTB_MURATA_ABZ
115+
nanowan.build.mcu=cortex-m0
116+
nanowan.build.extra_flags=
117+
nanowan.build.architecture=cortex-m0
118+
nanowan.build.board=MTB_MURATA_ABZ
119+
nanowan.build.ldscript=linker_script.ld
120+
nanowan.compiler.mbed.arch.define=-DARDUINO_ARCH_STM32L0x
121+
nanowan.compiler.mbed.defines={build.variant.path}/defines.txt
122+
nanowan.compiler.mbed.ldflags={build.variant.path}/ldflags.txt
123+
nanowan.compiler.mbed.cflags={build.variant.path}/cflags.txt
124+
nanowan.compiler.mbed.cxxflags={build.variant.path}/cxxflags.txt
125+
nanowan.compiler.mbed.includes={build.variant.path}/includes.txt
126+
nanowan.compiler.mbed.extra_ldflags=-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
127+
nanowan.compiler.mbed="{build.variant.path}/libs/libmbed.a"
128+
nanowan.vid.0=0x2341
129+
nanowan.pid.0=0x005a
130+
nanowan.vid.1=0x2341
131+
nanowan.pid.1=0x805a
132+
133+
nanowan.upload.tool=stm32flash
134+
nanowan.upload.protocol=
135+
nanowan.upload.maximum_size=196608
136+
nanowan.upload.maximum_data_size=20480
137+
nanowan.upload.use_1200bps_touch=false
138+
nanowan.upload.wait_for_upload_port=false
139+
nanowan.upload.native_usb=false
140+
141+
nanowan.bootloader.tool=openocd
142+
nanowan.bootloader.config=-f target/stm32.cfg
143+
nanowan.bootloader.programmer=-f interface/cmsis-dap.cfg
144+
nanowan.bootloader.file=nanowan/bootloader.hex

mbed-os-to-arduino

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -ex
22

33
MBED_CORE_LOCATION=$1
4-
BOARDNAMES=(ARDUINO_NANO33BLE)
4+
BOARDNAMES=(MTB_MURATA_ABZ)
55

66
#always work in /tmp
77
cd /tmp/
@@ -27,15 +27,25 @@ if [ -d $ARDUINOCORE ]; then
2727
mkdir -p $ARDUINOCORE/libs
2828
fi
2929

30+
rm -rf .mbedignore
31+
3032
mbed target $BOARDNAME
3133
mbed toolchain GCC_ARM
32-
echo -e "#include \"mbed.h\"\nint main() {Thread thd;}" > main.cpp
34+
echo -e "#include \"mbed.h\"\nint main() {}" > main.cpp
3335
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"rtos.main-thread-stack-size\": 32768,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200\n}\n}\n}\n" > mbed_app.json
3436

3537
if [ $BOARDNAME == "ARDUINO_NANO33BLE" ]; then
3638
echo -e "{\n\"macros\": [\n\"MBED_HEAP_STATS_ENABLED=1\",\n\"MBED_STACK_STATS_ENABLED=1\",\n\"MBED_MEM_TRACING_ENABLED=1\"\n],\n\"target_overrides\": {\n \"*\": {\n\"platform.stdio-buffered-serial\": true,\n\"platform.stdio-baud-rate\": 115200,\n\"platform.default-serial-baud-rate\": 115200,\n\"rtos.main-thread-stack-size\": 32768,\n\"target.mbed_app_start\": \"0x10000\"}\n}\n}\n" > mbed_app.json
3739
fi
3840

41+
if [ -d $ARDUINOCORE/conf ]; then
42+
cp -r $ARDUINOCORE/conf/* .
43+
fi
44+
45+
set +e
46+
mbed update
47+
set -e
48+
3949
rm -rf BUILD
4050

4151
mbed compile --source . --source ./mbed-os/features/unsupported/dsp/ -v | grep "Macros:" > $BOARDNAME.macros.txt

platform.txt

+15
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,18 @@ tools.bossac.cmd.windows=bossac.exe
128128
tools.bossac.upload.params.verbose=-d
129129
tools.bossac.upload.params.quiet=
130130
tools.bossac.upload.pattern="{path}/{cmd}" {upload.verbose} --port={serial.port.file} -U -i -e -w "{build.path}/{build.project_name}.bin" -R
131+
132+
# STM32FLASH
133+
tools.stm32flash.cmd=stm32flash
134+
tools.stm32flash.path={runtime.platform.path}/tools/windows
135+
tools.stm32flash.path.macosx={runtime.platform.path}/tools/macosx
136+
tools.stm32flash.path.linux={runtime.platform.path}/tools/linux
137+
tools.stm32flash.upload.params.verbose=-v
138+
tools.stm32flash.upload.params.quiet=
139+
tools.stm32flash.upload.pattern="{path}/{cmd}" {serial.port} -e 512 -b 2400 -w "{build.path}/{build.project_name}.dfu"
140+
tools.stm32flash.program.params.verbose=-v
141+
tools.stm32flash.program.params.quiet=
142+
tools.stm32flash.program.pattern="{path}/{cmd}" {serial.port} -e 512 -b 2400 -w "{build.path}/{build.project_name}.dfu"
143+
tools.stm32flash.erase.params.verbose=-v
144+
tools.stm32flash.erase.params.quiet=
145+
tools.stm32flash.erase.pattern="{path}/{cmd}" {serial.port} -e 512 -b 2400

variants/MTB_MURATA_ABZ/cflags.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-std=gnu11
2+
-DMBED_RAM_SIZE=0x5000
3+
-DMBED_RAM_START=0x20000000
4+
-DMBED_ROM_SIZE=0x30000
5+
-DMBED_ROM_START=0x8000000
6+
-DMBED_TRAP_ERRORS_ENABLED=1
7+
-Os
8+
-Wall
9+
-Wextra
10+
-Wno-missing-field-initializers
11+
-Wno-unused-parameter
12+
-c
13+
-fdata-sections
14+
-ffunction-sections
15+
-fmessage-length=0
16+
-fno-delete-null-pointer-checks
17+
-fno-exceptions
18+
-fomit-frame-pointer
19+
-funsigned-char
20+
-g1
21+
-mcpu=cortex-m0plus
22+
-mthumb
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
mbed-os/usb/*
2+
mbed-os/rtos/*
3+
mbed-os/components/*
4+
mbed-os/features/filesystem/*
5+
mbed-os/features/cellular/*
6+
mbed-os/features/net/*
7+
mbed-os/features/netsocket/*
8+
mbed-os/features/storage/*
9+
mbed-os/features/FEATURE_COMMON_PAL/nanostack-hal-mbed-cmsis-rtos/*
10+
mbed-os/features/nanostack/*
11+
mbed-os/features/device_key/*
12+
mbed-os/features/TEST_APPS/*
13+
mbed-os/features/TESTS/*
14+
mbed-os/features/UNITTESTS/*
15+
mbed-os/features/frameworks/greentea-client/*
16+
mbed-os/features/frameworks/mbed-client-cli/*
17+
mbed-os/features/frameworks/mbed-coap/*
18+
mbed-os/features/lwipstack/*
19+
mbed-os/features/frameworks/unity/*
20+
mbed-os/features/frameworks/utest/*
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://github.com/ARMmbed/mbed-semtech-lora-rf-drivers#16958f814d505cfbbedfa16d9bf8b9dff0e0442b
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"config": {
3+
"MTB_MURATA_ABZ": {
4+
"main_stack_size": 1024,
5+
"lora-radio": "SX1276",
6+
"lora-spi-mosi": "PA_7",
7+
"lora-spi-miso": "PA_6",
8+
"lora-spi-sclk": "PB_3",
9+
"lora-cs": "PA_15",
10+
"lora-reset": "PC_0",
11+
"lora-dio0": "PB_4",
12+
"lora-dio1": "PB_1",
13+
"lora-dio2": "PB_0",
14+
"lora-dio3": "PC_13",
15+
"lora-dio4": "NC",
16+
"lora-dio5": "NC",
17+
"lora-rf-switch-ctl1": "NC",
18+
"lora-rf-switch-ctl2": "NC",
19+
"lora-txctl": "PC_2",
20+
"lora-rxctl": "PA_1",
21+
"lora-ant-switch": "NC",
22+
"lora-pwr-amp-ctl": "PC_1",
23+
"lora-tcxo": "PA_12",
24+
"platform.cpu-stats-enabled": true,
25+
"events.use-lowpower-timer-ticker": true
26+
}
27+
}
28+
}
29+

variants/MTB_MURATA_ABZ/cxxflags.txt

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
-Wvla
2+
-fno-rtti
3+
-std=gnu++14
4+
-DMBED_RAM_SIZE=0x5000
5+
-DMBED_RAM_START=0x20000000
6+
-DMBED_ROM_SIZE=0x30000
7+
-DMBED_ROM_START=0x8000000
8+
-DMBED_TRAP_ERRORS_ENABLED=1
9+
-Os
10+
-Wall
11+
-Wextra
12+
-Wno-missing-field-initializers
13+
-Wno-unused-parameter
14+
-c
15+
-fdata-sections
16+
-ffunction-sections
17+
-fmessage-length=0
18+
-fno-delete-null-pointer-checks
19+
-fno-exceptions
20+
-fomit-frame-pointer
21+
-funsigned-char
22+
-g1
23+
-mcpu=cortex-m0plus
24+
-mthumb

variants/MTB_MURATA_ABZ/defines.txt

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
2+
-DARM_MATH_CM0PLUS
3+
-D__CMSIS_RTOS
4+
-DCOMPONENT_NSPE=1
5+
-DCOMPONENT_PSA_SRV_EMUL=1
6+
-DCOMPONENT_PSA_SRV_IMPL=1
7+
-D__CORTEX_M0PLUS
8+
-DDEVICE_ANALOGIN=1
9+
-DDEVICE_ANALOGOUT=1
10+
-DDEVICE_CRC=1
11+
-DDEVICE_FLASH=1
12+
-DDEVICE_I2C=1
13+
-DDEVICE_I2C_ASYNCH=1
14+
-DDEVICE_I2CSLAVE=1
15+
-DDEVICE_INTERRUPTIN=1
16+
-DDEVICE_MPU=1
17+
-DDEVICE_PORTIN=1
18+
-DDEVICE_PORTINOUT=1
19+
-DDEVICE_PORTOUT=1
20+
-DDEVICE_PWMOUT=1
21+
-DDEVICE_RESET_REASON=1
22+
-DDEVICE_RTC=1
23+
-DDEVICE_SERIAL=1
24+
-DDEVICE_SERIAL_ASYNCH=1
25+
-DDEVICE_SERIAL_FC=1
26+
-DDEVICE_SLEEP=1
27+
-DDEVICE_SPI=1
28+
-DDEVICE_SPI_ASYNCH=1
29+
-DDEVICE_SPISLAVE=1
30+
-DDEVICE_STDIO_MESSAGES=1
31+
-DDEVICE_TRNG=1
32+
-DDEVICE_USTICKER=1
33+
-DDEVICE_WATCHDOG=1
34+
-D__MBED__=1
35+
-DMBED_BUILD_TIMESTAMP=1564588692.2207866
36+
-D__MBED_CMSIS_RTOS_CM
37+
-DTARGET_CORTEX
38+
-DTARGET_CORTEX_M
39+
-DTARGET_FAMILY_STM32
40+
-DTARGET_LIKE_CORTEX_M0
41+
-DTARGET_LIKE_MBED
42+
-DTARGET_M0P
43+
-DTARGET_MTB_MURATA_ABZ
44+
-DTARGET_NAME=MTB_MURATA_ABZ
45+
-DTARGET_RELEASE
46+
-DTARGET_STM
47+
-DTARGET_STM32L0
48+
-DTARGET_STM32L082CZ
49+
-DTARGET_STM32L082xx
50+
-DTARGET_STM32L0x2xZ
51+
-DTOOLCHAIN_GCC
52+
-DTOOLCHAIN_GCC_ARM
53+
-DTRANSACTION_QUEUE_SIZE_SPI=2
54+
-DUSE_FULL_LL_DRIVER
55+
-DUSE_HAL_DRIVER
56+
-DMBED_NO_GLOBAL_USING_DIRECTIVE=1

0 commit comments

Comments
 (0)