Skip to content

Commit 946a1b5

Browse files
author
Jamie Smith
authored
Fix LoRaWan compile error, add DISCO_L072CZ_LRWAN1 upload method configuration (#170)
1 parent 5b25b17 commit 946a1b5

File tree

2 files changed

+56
-2
lines changed

2 files changed

+56
-2
lines changed

connectivity/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# These five directories create targets that are then used by buildfiles under drivers/
4+
# These six directories create targets that are then used by buildfiles under drivers/
55
add_subdirectory(nanostack)
66
add_subdirectory(cellular)
77
add_subdirectory(mbedtls)
88
add_subdirectory(nfc)
9+
add_subdirectory(lorawan)
910
if("FEATURE_BLE=1" IN_LIST MBED_TARGET_DEFINITIONS)
1011
add_subdirectory(FEATURE_BLE)
1112
endif()
1213

1314
add_subdirectory(drivers)
1415
add_subdirectory(libraries)
15-
add_subdirectory(lorawan)
1616
add_subdirectory(lwipstack)
1717
add_subdirectory(netsocket)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Mbed OS upload method configuration file for target DISCO_L072CZ_LRWAN1.
2+
# To change any of these parameters from their default values, set them in your build script between where you
3+
# include app.cmake and where you add mbed os as a subdirectory.
4+
5+
# Notes:
6+
# 1. To use this target with PyOCD, you need to install a pack: `python -m pyocd pack install STM32L072CZTx`.
7+
# You might also need to run `pyocd pack update` first.
8+
# 2. To use J-Link you must convert your board's ST-Link into a J-Link using the reflash program.
9+
10+
# General config parameters
11+
# -------------------------------------------------------------
12+
set(UPLOAD_METHOD_DEFAULT MBED)
13+
14+
# Config options for MBED
15+
# -------------------------------------------------------------
16+
17+
set(MBED_UPLOAD_ENABLED TRUE)
18+
set(MBED_RESET_BAUDRATE 115200)
19+
20+
# Config options for JLINK
21+
# -------------------------------------------------------------
22+
23+
set(JLINK_UPLOAD_ENABLED TRUE)
24+
set(JLINK_CPU_NAME STM32L072CZ)
25+
set(JLINK_CLOCK_SPEED 4000)
26+
set(JLINK_UPLOAD_INTERFACE SWD)
27+
28+
# Config options for PYOCD
29+
# -------------------------------------------------------------
30+
31+
set(PYOCD_UPLOAD_ENABLED TRUE)
32+
set(PYOCD_TARGET_NAME STM32L072CZTx)
33+
set(PYOCD_CLOCK_SPEED 4000k)
34+
35+
# Config options for OPENOCD
36+
# -------------------------------------------------------------
37+
38+
set(OPENOCD_UPLOAD_ENABLED TRUE)
39+
set(OPENOCD_CHIP_CONFIG_COMMANDS
40+
-f ${OpenOCD_SCRIPT_DIR}/board/st_nucleo_l073rz.cfg)
41+
42+
# Config options for STM32Cube
43+
# -------------------------------------------------------------
44+
45+
set(STM32CUBE_UPLOAD_ENABLED TRUE)
46+
set(STM32CUBE_CONNECT_COMMAND -c port=SWD reset=HWrst)
47+
set(STM32CUBE_GDBSERVER_ARGS --swd)
48+
49+
# Config options for stlink
50+
# -------------------------------------------------------------
51+
52+
set(STLINK_UPLOAD_ENABLED FALSE)
53+
set(STLINK_LOAD_ADDRESS 0x8000000)
54+
set(STLINK_ARGS --connect-under-reset)

0 commit comments

Comments
 (0)