Re: [Bacnet-developers] Having problem porting STM32F4xx
Brought to you by:
skarg
|
From: Steve K. <st...@ka...> - 2021-05-17 16:11:40
|
Hello Emre, Without the entire project and your hardware, it's hard to tell what is causing the reset - ARM is very sensitive about certain C program usage - and powering a device with USB (or whatever you are using) can also have interesting reset issues. The example in the open source stack did not have that behavior on the NUCLEO-F429ZI board with my PC and USB setup, but it's always possible there was a bug - I'm not perfect. Assuming that your project is exhibiting an ARM Cortex-M Hard Fault (versus some kind of watchdog or power issue), you can trace the culprit by adding a hard fault handler. Here is some guidance for IAR: https://www.iar.com/knowledge/support/technical-notes/debugger/debugging-a-hardfault-on-cortex-m/ Best Regards, Steve On Mon, May 17, 2021 at 8:43 AM Emre Can Kirtorun <krt...@gm...> wrote: > Hello Steve, > > I tried the IAR Workspace file and it is compiled and now seems to be > working. But when the program is running, MCU resets itself repeatedly. As > far as I know, the watchdog timer is not enabled. Do you have any idea what > may cause this? > > Best regards, > Emre > > Steve Karg <st...@ka...>, 11 May 2021 Sal, 18:25 tarihinde şunu yazdı: > >> Hello Emre Can Kirtorun, >> >> You didn't mention which compiler or IDE you are using, so I'm guessing >> you are not using the example code in ports/stm32f4xx folder as-is. >> The IAR project file uses some defines to tune RAM usage, and there are >> more settings in src/bacnet/config.h >> <https://sourceforge.net/p/bacnet/src/ci/master/tree/src/bacnet/config.h> >> file that can be overridden from their defaults, or just make your own >> config file. >> >> IAR: >> <state>NDEBUG</state> >> <state>USE_STDPERIPH_DRIVER</state> >> <state>STM32F4XX</state> >> <state>BACDL_MSTP</state> >> <state>MAX_APDU=480</state> >> <state>BIG_ENDIAN=0</state> >> <state>MAX_TSM_TRANSACTIONS=1</state> >> >> GCC Makefile: >> >> BACNET_FLAGS = -DBACDL_MSTP=1 >> BACNET_FLAGS += -DBACAPP_ALL >> BACNET_FLAGS += -DMAX_APDU=480 >> BACNET_FLAGS += -DBIG_ENDIAN=0 >> BACNET_FLAGS += -DMAX_TSM_TRANSACTIONS=0 >> BACNET_FLAGS += -DMAX_CHARACTER_STRING_BYTES=64 >> BACNET_FLAGS += -DMAX_OCTET_STRING_BYTES=64 >> # if called from root Makefile, PRINT was already defined >> BACNET_FLAGS += -UPRINT_ENABLED >> BACNET_FLAGS += -DPRINT_ENABLED=0 >> >> Probably MAX_TSM_TRANSACTIONS needs to be lowered, since the default is >> 255. >> >> Best regards, >> >> Steve >> >> >> On Tue, May 11, 2021 at 4:40 AM Emre Can Kirtorun <krt...@gm...> >> wrote: >> >>> Hello everyone, >>> >>> I've been trying to port stm32f4xx on my smt32f4 device and when I try >>> to compile the whole bacnet stack I receive a RAM error which says RAM >>> overflow . I have no idea about where I made a mistake but any help would >>> be appreciated. >>> >>> Best regards. >>> _______________________________________________ >>> BACnet-developers mailing list >>> BAC...@li... >>> https://lists.sourceforge.net/lists/listinfo/bacnet-developers >>> >> _______________________________________________ >> BACnet-developers mailing list >> BAC...@li... >> https://lists.sourceforge.net/lists/listinfo/bacnet-developers >> > |