Knowledge Base

LoRaWAN endpoint stack implementation

Hi, I have been working with the LoRaWAN endpoint stack downloaded from github

Using eclipse with the arm tools and the CDT internal builder I think I have made things harder for myself by not using the CMAKE external builder.

Anyhow I now have the CLASS A demo working with the SX1261 and the nucleo demo boards. It maybe worth documenting that in order to get the semihost working you have to disable the _read and _write functions.

In total the code takes 96K which seems massive even with the printf functions enabled. What advice can anyone give me to reducing the code size. Also any ideas what I should be expecting for the basic Class A end point?

Kind Regards.


Could you please specify which stack you are using ?

I am using the latest stack on GitHub

I just want to know what code size I should expect for just the Class A, ABP. EU868 with the SX1272?

96K seems very large I was hoping to get it down to around 6K

Many Thanks,


Code size is compiler depended. First it seems that you have no optimization options activated. Then Keil is more efficient than arm-gcc regarding ROM optimization

That said you will not be able to get a 6kB stack. LoRaMAC node class A needs from 20 to 45 kB depending on the number of region you include, then 6kB for the radio drivers.

Please have a look at the following app note: