Posts by SEGGER - Johannes

    Hi,

    in Embedded Studio V5 the size attribute defined the minimum size of a section.
    If you would have placed less than 0x1000 bytes into this section, it would have been expanded.

    See line 6 of the generated linker script:


    Embedded Studio V6.32 adds an additional assert to also make the attribute the maximum size of a section:

    Code
    . = ASSERT(__my_non_init_size__ <= 0x1000 , "error: .my_non_init is larger than specified size");

    If that is the behavior you would expect, you could upgrade to the latest version of Embedded Studio, or change your project to use a custom linker script which includes the additional assert.

    - Johannes

    Hi Peter,

    A huge gap/jump in the timestamps happens when there is an overflow in the timestamp delta, i.e. the previous event had a higher timestamp than the current one.
    This is usually triggered when the timer interrupt which is used for the timestamps becomes pending while getting the timestamp.
    You will need to account for that in SEGGER_SYSVIEW_X_GetTimestamp().

    As a reference, have a look at Samples/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_embOS_CM0.c, which uses the SysTick timer as timestamp source.

    Also make sure that SEGGER_SYSVIEW_TickCnt is incremented in SysTick handler before generating any SystemView events.

    Regards
    Johannes

    Hello Markus,

    Your section placement file looks fine,
    but you will need to also add the segments to the memory map file as follows:

    XML
    <MemorySegment name="RAM" start="0x2000 8000" size="0x0003 8000" access="Read/Write" />
      <MemorySegment name="STACK" start="0x2000 0000" size="0x0004 0000" access="Read/Write" />


    Best regards
    Johannes

    Hello Jean-Louis,

    You are right, multi-core debug and development might be important for some, but is not of broader interest.
    However, we are taking care of this topic, and will improve multi-core debugging with J-Link, as well as multi-core application development.

    Usually, especially on embedded systems, you want to have full control and knowledge about memory (ROM and RAM) use.
    Multi-core applications are mostly similar to single-core applications. Code is in separate (Flash) regions and so is "private" data.
    The new thing is common data, used by both cores.

    The simple solution for common data is to place it at a given address and use it at that address in both cores.
    This is feasible for a small number of common variables, e.g. you put all common data in one struct.
    With the SEGGER Linker you cold also put all common variables into one section in both applications and make sure they are ordered the same way.
    This can for example be done with "place in SHARED_RAM with alphabetical order { section .common, section .common.* }; keep { section .common, section .common.* };"
    Mixing private data and common data in the same region is never recommended.

    There are a few other things to take care of, such as initializing common data only in one application.

    We might improve the SEGGER Linker in the future to export symbols in one application and make them available in the other application,
    but there is no fixed plan or roadmap for such a feature, yet.

    Regards
    Johannes

    Hi,

    As described, Semihosting is handled by the debugger, in this case GDB/GDB Server.
    Therefore the actual implementation and available commands as well as the expected target behavior is dependent on the debugger.
    The J-Link User Guide describes the common available Semihosting commands in general.

    For GDB Server SYS_RENAME and SYS_REMOVE are disabled for security reasons.
    You could otherwise, intended or not intended, severely mess up the debugger host.
    In the GDB Server you should have seen a message about this when you tried to execute those commands:
    "Semi hosting error: SYS_RENAME: Target tries to rename file. Declined for security reasons."

    All other Semihosting commands are available and tested with GDB Server.

    Regards
    Johannes

    PS: Nino sent you a PM. Feel free to contact us via mail if there are any other questions.

    Hi,

    Your idea is going into the right direction.

    Embedded Studio has two types of configurations:
    Public Configurations, which are the build configurations you can select
    and Private Configurations, which can only be inherited by Public Configurations.

    In your case you would want the private configurations Debug, Release, CortexM0 and CortexM3 and the public configurations Debug M0 (inherits Debug and CortexM0), Debug M3 (inherits Debug and CortexM3), Release M0, and Release M3.

    What probably went wrong is that you already have the public configurations Debug and Release.
    You can remove them (or make them private by adding <property name="hidden" value="Yes" />).

    You will also need to make sure that configuration names are unique.
    You cannot have a public and private configuration with the same name.

    Regards
    Johannes

    Hi,

    With emBuild it is not possible to add preprocessor definitions, you can only modify them.
    But that seems to be what you will need.

    In the project options preprocessor definitions add APP_VER=$(EXT_APP_VER)
    and then call embuild -config "Release" -D EXT_APP_VER="b92662f" E:\corp\Code\buildDir\app\app.emProject
    That will resolve $(EXT_APP_VER) to "b92662f" and you can use it through APP_VER in your application.

    Regards
    Johannes

    Hi Markus,

    The crt0 is the generic memory initialization that is independent from hardware.

    Before _start is called, the Reset_Handler will call system initialization, and, if defined, memory initialization.
    This is the target-specific part where you can enable and configure TCM.

    Regards
    Johannes

    Hi,

    The libraries that you try to link come from the newlib standard library.
    Embedded Studio instead includes its own standard library that is much more optimized for small micros.

    How did you create the project?
    Did you use the Nordic SDK examples?

    The documentation of the Nordic SDK also describes how to flash the softdevice.
    Maybe have a look at it or search the Nordic forums.

    You can specify the softdevice hex as an additional loader file that is loaded with the application on debug start.

    Regards
    Johannes

    Hi Matthew,

    Embedded Studio currently only supports some generic templates that can be entered through the menu (Edit -> Templates) or through code completion suggestions.
    Custom templates are already on our list for improvements. This would enable you to create whole comment blocks with one shortcut. Dynamic input of function name and parameters into the comment is not supported.
    We will also add file templates for new files to the wishlist.

    There are no 3rd party plugins for ES, but you can call external tools on your files, e.g. to open them in an external editor or to run code analysis tools.
    That can also be used to open any external tool to convert and insert doxygen comment blocks.

    Best regards
    Johannes

    Hi,

    Thanks for the detailed explanation.
    I got your point, and you are right, it is mostly a philosophical issue. But that does not mean we can't change it.

    We probably will not switch to the Eclipse way of filesystem oriented organization.
    But we might add improvements to enable you to better work on the filesystem level.

    Regards
    Johannes

    Hi Pablo,

    did you make sure that the tick frequency in the SystemView configuration is correct?
    Do you change the system frequency at run time?

    When the configured frequency is incorrect, you will get wrong timings.
    The timer interrupt frequency should not change during run time. If it does although the system frequency does not change, something more is wrong.

    Regards
    Johannes

    Hi,

    Thank you for the feedback. Much appreciated.
    Let me explain the project management a bit.

    Embedded
    Studio has been designed to be as flexible as possible and to fit most
    user's needs, providing the most capable options to create manage and
    develop your projects.

    The Project Manager features two options to manage your project sources:

    1. Virtual folders:
    Folders in an Embedded Studio project are virtual, i.e. they do not need to reflect the actual file system.
    You can create as many virtual folders and sub-folders as you need.
    You
    can add files from anywhere on your disk into any virtual folder. Even
    files from different folders on disk can be in the same virtual folder.
    Through the file selection dialog or via drag&drop from the Windows Explorer you can add multiple files at once.

    2. Dynamic folders:
    Dynamic folders in Embedded Studio are bound to a directory on disk and show its contents.
    Which
    files to include in a dynamic folders can be set by filter and exclude
    specifications. E.g. *.c; *.h to only include C sources and headers.
    A dynamic folder can include either only files from one directory or recurse into its sub-directories.
    Dynamic
    folders are automatically synchronized with disc contents on (re-)load
    of a project. Synchronization can be done manually, too, e.g. when new
    sources have been added.
    The dynamic folder options can also be changed later from the context menu, e.g. to change the exclude filters.

    Within one project you can of course use virtual folders and dynamic folders in parallel.
    You can also convert dynamic folders into virtual folders from the context menu.

    Does this help or maybe even change your mind?

    Regards
    Johannes