On 2024-10-03 14:16:40, Roberto Bucher wrote: > _assert: Assertion failed panic: at file: armv7-m/arm_hardfault.c:175 task: > 0x80002b9 > > and this is related to the call of the function > > exit(1); > > in my code, for example if a device is not defined. The call to this exit(1) > function leads to this assertion error. > Basically, what I have to do is only to stop my (generated) application and > I think that it was ok in the past... > > Any idea how to solve this? I don't understand? What do you wanna solve? Hardfault? Well, then don't call exit() function? I mean, if program cannot continue just add proper log before doing call to exit() so next person does not have to think hard what is going on. Better yet - if it's possible to do, use static_assert()/COMPILE_TIME_ASSERT() to issue error during compilation time that something is not defined.
-- .-----------------.-------------------.----------------------.-----------------. | Michal Lyszczek | Embedded C, Linux | Company Address | .-. opensource | | +48 727 564 419 | Software Engineer | Akacjowa 10a; 55-330 | oo| supporter | | https://bofc.pl `----.--------------: Brzezinka Sredzka PL | /`'\ & | | GPG FF1EBFE7E3A974B1 | Bits of Code | NIP: 813 349 58 78 |(\_;/) programer | `----------------------^--------------^----------------------^-----------------'
signature.asc
Description: PGP signature