[SOLVED] nRF52810 Code Generation Options

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] nRF52810 Code Generation Options

    Hello all!

    I'm trying to get a project that was initially wrote for an nRF52832 to work with an nRF52810 core and I can't successfully compile because of floating point errors. It seems like the Code Generation -> ARM FPU Type should be selected as "Soft", bu the drop down menu does not have "Soft" in the list.

    I've opened an SDK example for an emulated nRF52810, and the ARM FPU Type correctly shows the "Soft" selection. I have no idea how that got saved as "Soft" when this option is not part of the list, but it's there nevertheless. If I try to change it to something else I can never get it back to "Soft".

    How do I get the "Soft" option in the ARM FPU Type field? I'm using Embedded Studio 4.12 in Windows x64.

    Thank you!


    PS - A few hours later I got everything working after editing the emProject file and changing a couple of lines, but somehow I don't think this is the right way to do it, the "Soft" option should have been part of the drop-down menu and it's not:
    Images
    • ARM FPU Options.png

      57.67 kB, 1,480×823, viewed 21 times

    The post was edited 1 time, last by vardelean ().

  • Hello,

    Thank you for your inquiry.
    The issue here is that for the option ARM FPU Type no Soft setting even exists.
    This is only meant to be used in the ARM FP ABI Type option.
    So no clue why it was set by Nordic here but the value is simply wrong.
    Valid values for the ARM FPU Type can be found in the dropdown or the description below in the window and we strongly suggest to use only that values.
    You can "hack" other values into this field by editing the ES project file with a text editor, but we do not recommend this as it can lead to unexpected follow up errors.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    Alternatively our support system can be used as well: segger.com/ticket/
  • Thank you for your reply Nino,

    I agree with you, it shouldn't be there, but if you import any emulated 52810 projects from Nordic, they will all have the Soft option in the ES project.

    Yes, I had to "hack" the file to get it to show as software floating point emulation in the ARM FPU Type because otherwise the project won't compile (FP errors). The real issue is that if anyone wants to start an nRF52810 project from scratch it won't work unless you hack the project file. Same for changing any other 52832 projects into a 52810 project.
    The only projects that work are the emulated projects, and they all have the software option on.

    Nordic doesn't offer an 52810 DK, you can only get an 52832 DK for development. So I developed for nRF52832 using Nordic's DK, made a prototype board with the proper target (nRF52810) and moved on to run the code on my prototype board. I've done all the changes as per the Developing for nRF52810 article, but compiler complained about the floating point options. Hacking the ES project file was the only way to get this to run, and I was thinking that there should be a better way to get this to work.

    So from my POV, this issue is now closed, I have already found the solution, but Segger should probably want to look into this a bit closer.

    One more thing: the nRF52810 doesn't have an FPU, but option "None" is not going to work because you still have to tell the compiler to enable full software floating-point support.

    The post was edited 1 time, last by vardelean ().

  • Hello,

    vardelean wrote:

    I agree with you, it shouldn't be there, but if you import any emulated 52810 projects from Nordic, they will all have the Soft option in the ES project.
    Which is an error with the emulated 52810 project and not ES.

    vardelean wrote:

    The real issue is that if anyone wants to start an nRF52810 project from scratch it won't work unless you hack the project file. Same for changing any other 52832 projects into a 52810 project.
    The only projects that work are the emulated projects, and they all have the software option on.
    If you create a new nRF52810 project from scratch using the CPU support packages from ES all options will be set correctly.
    ARM FPU Type will be "None" and ARMFP ABI Type will be Soft. So again no problem with ES.

    vardelean wrote:

    Hacking the ES project file was the only way to get this to run, and I was thinking that there should be a better way to get this to work.
    You should be able to set ARM FPU Type to "None". This should fix any compile errors.

    vardelean wrote:

    the nRF52810 doesn't have an FPU, but option "None" is not going to work because you still have to tell the compiler to enable full software floating-point support.
    Not really. If you are looking for full software floating-point support features set Soft as ARM FP ABI Type. That is all that is needed.
    Or is something not working for you then?
    Could you give an example?

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    Alternatively our support system can be used as well: segger.com/ticket/
  • OK, so I started a project from scratch for nRF52810, added my files from the nRF52832 original project, and everything runs and compiles great, no errors.

    Have no idea why that soft option is in all the emulated projects, it confused the heck out of me, but as you said, it really doesn't matter, everything works fine with the proper selection (ARM FPU Type = None).

    Thanks again for all the help!

    Vlad
  • Hi Vlad,

    Glad to hear that you are up and running again.
    We will consider this thread as solved now.

    Best regards,
    Nino
    Please read the forum rules before posting: Forum Rules

    Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support contact us per e-mail.
    Alternatively our support system can be used as well: segger.com/ticket/