Line Numbers Configuration Option precautions

Report any suspected bugs that you find
Post Reply
Site Admin
Posts: 424
Joined: Fri Dec 31, 2010 12:30 pm

Line Numbers Configuration Option precautions

Post by cfbsoftware » Wed Nov 18, 2020 2:03 am

v7.2 introduced a new Configuration Option: Line Numbers (not to be confused with the Tools > Preferences > Editor option with the same name). When a runtime error occurs a callback trace of the sequence of procedure calls that led to the error is reported by the library module Traps. Each line of the trace shows the module name, procedure name and the absolute address of the location of the call in the executable. The relevant source code line number of each procedure is also shown if the Line Numbers Configuration Option is enabled.

The default value of the option is switched on. That is the recommended option to use and should only be switched off if you need to reduce the size of the resulting application. Tests indicate that the reduction in code size is about 8%.

There are a couple of potential problems related to changing the Line Number option:
  • Every module linked to an application must be compiled with the same Line Number configuration setting. This is not currently enforced by the linker.
  • Source code is not currently distributed for the special modules FPU (Floating-point emulation) and MAU (Dynamic Memory Allocation). The object files included with the system are compiled with Line Numbers switched on and that cannot be changed by the user.
Both of these problems will be addressed in the next maintenance release.

In the meantime, make sure you always use the Project > Rebuild command after you have changed the Line Number option. Check the linker map file produced for the application. It should show +n against every module if you switched the Line Number option on, otherwise –n.

if you are a registered user and need to build an application with Line Numbers switched off which:

* Targets Cortex-M3 and imports the FPU module


* Targets Cortex-M3, M4 or M7 and Imports the MAU module

contact Astrobe Email Support for a workaround solution.

Post Reply