cancel
Showing results for 
Search instead for 
Did you mean: 

LoRa L073 End Node. where is IRQ_Type delcared ?

T J
Lead
Posted on January 13, 2018 at 01:59

I am trying to run this End Node example in Visual Studio.

but;

   hw_gpoi.h has these errors:

[Clang IntelliSense] Error: unknown type name 'IRQn_Type'    Lora_1    c:\vs2018\lora_1\inc\hw_gpio.h    86  

also fails with  GPIO_TypeDef , GPIO_InitTypeDef  types.

where are these types declared ?

USE_STM32L0XX_NUCLEO is not defined either, where should that be defined ?

#visualgdb #lora
7 REPLIES 7
Posted on January 13, 2018 at 02:18

USE_STM32L0XX_NUCLEO is passed as a command line define

The PingPong project use these for the DISCO board

STM32L072xx, USE_B_L072Z_LRWAN1, USE_HAL_DRIVER, USE_BAND_915, USE_MODEM_LORA

Most of the includes pull via stm32l0xx_hal_conf.h

STM32CubeExpansion_LRWAN_V1.1.1\Drivers\CMSIS\Device\ST\STM32L0xx\Include\stm32l072xx.h(128) : } IRQn_Type;

Expect 

STM32L072xx define to be critical to pull part specific IRQ tables.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on January 13, 2018 at 02:29

 ,

 ,

are you taking about the make file ? , ,

 ,

where would I pass the parameters ? ,

USE_STM32L0XX_NUCLEO,

STM32L073xx, USE_HAL_DRIVER, USE_BAND_915, USE_MODEM_LORA

is that the correct list for the L073' nucleo board ?

?? Make file from Visual Studio project wizard

♯ Generated by VisualGDB (

https://community.st.com/external-link.jspa?url=http%3A%2F%2Fvisualgdb.com

)

 ,

♯ DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO

 ,

♯ USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD

BINARYDIR := Debug

♯ Additional flags

 ,

PREPROCESSOR_MACROS := DEBUG=1

 ,

INCLUDE_DIRS := inc ../../../../STM32CubeExpansion_LRWAN_V1.1.4/Middlewares/Third_Party/Lora/Core ../../../../STM32CubeExpansion_LRWAN_V1.1.4/Middlewares/Third_Party/Lora/Mac ../../../../STM32CubeExpansion_LRWAN_V1.1.4/Middlewares/Third_Party/Lora/Utilities

 ,

LIBRARY_DIRS :=

 ,

LIBRARY_NAMES :=

 ,

ADDITIONAL_LINKER_INPUTS :=

 ,

MACOS_FRAMEWORKS :=

 ,

LINUX_PACKAGES :=

CFLAGS := -ggdb -ffunction-sections -O0

 ,

CXXFLAGS := -ggdb -ffunction-sections -fno-exceptions -fno-rtti -O0

 ,

ASFLAGS :=

 ,

LDFLAGS := -Wl,-gc-sections

 ,

COMMONFLAGS :=

 ,

LINKER_SCRIPT :=

START_GROUP := -Wl,--start-group

 ,

END_GROUP := -Wl,--end-group

♯ Additional options detected from testing the toolchain

 ,

USE_DEL_TO_CLEAN := 1

 ,

CP_NOT_AVAILABLE := 1

ADDITIONAL_MAKE_FILES := stm32.mak

 ,

GENERATE_BIN_FILE := 1

 ,

GENERATE_IHEX_FILE := 0
Posted on January 13, 2018 at 02:50

I'm not using VisualGDB

At a guess enumerated in 

PREPROCESSOR_MACROS, but pretty sure this is one of those things where you put the values in the project metadata which builds the makefile. Look where DEBUG=1 exists, and where you list your Include paths

Alternatively as -D

USE_STM32L0XX_NUCLEO in your CFLAGS, ie stuff pass to the compiler via its command line

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on January 13, 2018 at 02:53

Using GNU MAKE for a F4 based build

♯=============================================================================♯

♯ ARM makefile

♯=============================================================================♯

♯=============================================================================♯

♯ toolchain configuration

♯=============================================================================♯

TOOLCHAIN = arm-none-eabi-

CXX = $(TOOLCHAIN)g++

CC = $(TOOLCHAIN)gcc

AS = $(TOOLCHAIN)gcc -x assembler-with-cpp

OBJCOPY = $(TOOLCHAIN)objcopy

OBJDUMP = $(TOOLCHAIN)objdump

SIZE = $(TOOLCHAIN)size

RM = rm -f

♯=============================================================================♯

♯ project configuration

♯=============================================================================♯

♯ project name

PROJECT = demo

♯ core type

CORE = cortex-m4

♯ linker script

LD_SCRIPT = stm32f401.ld

♯ output folder (absolute or relative path, leave empty for in-tree compilation)

OUT_DIR = out

♯ global definitions for C++, C and ASM (e.g. 'symbol_with_value=0xDEAD symbol_without_value')

GLOBAL_DEFS = USE_STDPERIPH_DRIVER STM32F401xx USE_STM32F4_DISCOVERY USE_USB_OTG_FS HSE_VALUE=8000000

♯ C++ definitions

CXX_DEFS =

♯ C definitions

C_DEFS =

♯ ASM definitions

AS_DEFS =

♯ include directories (absolute or relative paths to additional folders with

♯ headers, current folder is always included)

INC_DIRS = inc

...

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
T J
Lead
Posted on January 13, 2018 at 04:13

I added these in the VGDB project properties in CFLAGS: -DSTM32L073xx -DUSE_STM32L0XX_NUCLEO -DUSE_HAL_DRIVER -DUSE_BAND_915 -DUSE_MODEM_LORA

added this to the include directories:

../../../../STM32CubeExpansion_LRWAN_V1.1.4\Drivers\BSP\STM32L0xx_Nucleo

../../../../STM32CubeExpansion_LRWAN_V1.1.4\Middlewares\Third_Party\Lora\Phy

commented out Leds 1,3,4 in mlm32l0xx_hw.c  // thats not correct, the problem maybe be here Whats a mlm file ?

I had to 'exclude from project' all the STM32L1,2,3,4 files in src and inc.

Warning        'assert_param' redefined    Lora_1    \VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32\STM32L0xxxx\STM32L0xx_HAL_Driver\Src\stm32l0xx_ll_utils.c    45    

multiple definition of `HAL_InitTick'    Lora_1    C:\Users\nickm\Documents\VS2018\Lora_1\src\stm32l0xx_hal_msp.c    72  

multiple definition of `HAL_Delay'    Lora_1    C:\Users\nickm\Documents\VS2018\Lora_1\src\stm32l0xx_hal_msp.c    72    

.

maybe something is wrong here:

in CFLAGS: -DSTM32L073xx -DUSE_STM32L0XX_NUCLEO -DUSE_HAL_DRIVER -DUSE_BAND_915 -DUSE_MODEM_LORA

I removed the mlm files from the project

now we have:

Warning        'assert_param' redefined    Lora_1    C:\Users\nickm\AppData\Local\VisualGDB\EmbeddedBSPs\arm-eabi\com.sysprogs.arm.stm32\STM32L0xxxx\STM32L0xx_HAL_Driver\Src\stm32l0xx_ll_utils.c    45    

Error        undefined reference to `LPM_SetStopMode'    Lora_1    C:\Users\nickm\Documents\VS2018\Lora_1\Lora_1\src\hw_rtc.c    396  

Error        undefined reference to `LPM_SetOffMode'    Lora_1    C:\Users\nickm\Documents\VS2018\Lora_1\Lora_1\src\main.c    192    

.

.

Posted on January 13, 2018 at 05:06

MLM Murata LoRa Module?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
T J
Lead
Posted on January 13, 2018 at 09:32

I have some progress, now I can compile and single step the Nucleo L073 board in pingpong

and now the L072-LRWan1 board is running too. oops when I edit main.c in one, its changing in the other too..