Encountered __ASM volatile Exception When Hex File Size Exceeds 900KB

We have developed a firmware application using the OpenThread library for the nRF52840, utilizing the Nordic Development Kit and Segger Embedded Studio for ARM (version 5.42).

The system crashes at the __ASM volatile instruction when the generated hex file size exceeds 900KB. For instance, with a hex file size of 950KB (approximately 340KB of flash occupied on the nRF52840), the system fails to operate. However, when the build is optimized to reduce the hex file size to 880KB (still approximately 340KB of flash usage), the system functions correctly.

We are unable to understand why this significant difference in behavior occurs, given the flash usage remains the same. Additionally, this limitation prevents us from adding further code to the project.

A relevant screenshot has been attached for reference.

Parents Reply Children
Related