Blog Post Roundup: C++ Exceptions and Remote Web Console
Posted: Tue Jan 09, 2024 3:51 pm
For those not subscribed to our newsletter, we've got two recent blog posts up that might be useful for you:
C++ Exceptions, Unwind Tables, and ‘relocation truncated to fit: R_ARM_PREL31’
Most embedded developers who’ve worked with a Cortex-M4 or newer part with external memory will likely have encountered a linker error at some point telling them ‘relocation truncated to fit: R_ARM_PREL31 against .ARM.extab…’. But what on earth does this cryptic message mean? Is there a solution to it? Why does it only appear in the link stage?
The standard advice is for the user to enable the GCC flag -fno-exceptions, but that doesn’t help if you actually want to use C++ exceptions. So, if that advice is a dead end, how are we to fix the underlying issue? In this post, we’re going to be condensing several rather deep topics to their relevant bits and showing when you can and can’t truly resolve this error.
New Feature: Remote Web Console
Tired of scrounging for a USB cable to access your NetBurner serial console? No longer!
A common problem when developing embedded applications is when you’re testing, deploying, or maintaining the program on a device or in the field and physical access is limited. USB cables only stretch so far!
Our team felt this limitation ourselves and with a name like NetBurner you’d expect a fully-network-enabled stack to be possible out of the box, right?
Perfect Timing.
So, over the holidays we whipped up a Remote Console powered by WebSockets, accessible over the same HTTP port used by normal NetBurner applications and customizable to your needs.
It’ll be part of the upcoming NNDK release, but we’re also making the code available on its own so you can backport this feature to your NNDK 3.4 apps.
C++ Exceptions, Unwind Tables, and ‘relocation truncated to fit: R_ARM_PREL31’
Most embedded developers who’ve worked with a Cortex-M4 or newer part with external memory will likely have encountered a linker error at some point telling them ‘relocation truncated to fit: R_ARM_PREL31 against .ARM.extab…’. But what on earth does this cryptic message mean? Is there a solution to it? Why does it only appear in the link stage?
The standard advice is for the user to enable the GCC flag -fno-exceptions, but that doesn’t help if you actually want to use C++ exceptions. So, if that advice is a dead end, how are we to fix the underlying issue? In this post, we’re going to be condensing several rather deep topics to their relevant bits and showing when you can and can’t truly resolve this error.
New Feature: Remote Web Console
Tired of scrounging for a USB cable to access your NetBurner serial console? No longer!
A common problem when developing embedded applications is when you’re testing, deploying, or maintaining the program on a device or in the field and physical access is limited. USB cables only stretch so far!
Our team felt this limitation ourselves and with a name like NetBurner you’d expect a fully-network-enabled stack to be possible out of the box, right?
Perfect Timing.
So, over the holidays we whipped up a Remote Console powered by WebSockets, accessible over the same HTTP port used by normal NetBurner applications and customizable to your needs.
It’ll be part of the upcoming NNDK release, but we’re also making the code available on its own so you can backport this feature to your NNDK 3.4 apps.