This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Flashing Existing FW

Hi,

I've been trying to make a small modification on the existing Nordic Thingy firmware, such as changing the color of an LED, by compiling the existing Nordic Thingy 52 firmware on the SDK and flashing it.

However having tried both using gcc and segger to compile and flash, both methods ended up just wiping out the thingy LED entirely, and the Nordic Thingy wasn't functional until I reset it using the existing FW.

I was just wondering if there was any other methods of going about this that I should try?? Thanks.

Parents
  • Hi!

    The Thingy:52 FW does not actually support Segger. The project file that is available in the Thingy:52 SDK is actually broken, see this ticket and this ticket.

     I suggest trying to edit the source code using Keil, and then building and flashing with Keil. 

    If you still cannot get it to work, could you please provide some more details about how you are changing the source code, which source code you are using, etc. 

    Best regards,

    Heidi

  • I’m not too sure what you mean by the Thingy:52 not being supported by Segger because I was able to compile one of the nRF52-dk example files in Segger just fine and since the nRF52-dk and the Thingy:52 are based on the same microcontroller, shouldn’t the Thingy:52 compile as well? But yes, I think that the Thingy:52 SDK is broken too.

    I downloaded and installed Keil and also opened the Thingy:52 SDK files with Keil. But when I tried to compile using Keil without making any changes to the existing code, the compilation failed yet again with 92 errors and I think all of them were errors that had to do with missing files. But on the other hand, Keil compiled the nRF52-dk example files just fine (as was the case with Segger and gcc compilation).

    Unfortunately, I still can’t get it to work. 

    As for what I’ve done to change the LED color on the Thingy, I initially went to the “m_ui.c” file (https://github.com/NordicSemiconductor/Nordic-Thingy52-FW/blob/master/source/modules/m_ui.c)

    in the Thingy:52 SDK repo on my machine, opened it with a text editor, changed lines 378-380 to be 

    rgb.r = 255;

    rgb.g = 255;

    rgb.b = 255;

    just to make it an obvious all-white color so I’d see a change in the Thingy’s LED. I compiled the file with gcc and it generated a .hex file. I dragged and dropped the .hex file into the JLINK folder popup that comes up when I connect the nRF52-dk to my machine (while having the Thingy:52 connected to the nRF52-dk via a 10-pin cable). For some reason, this puts the Thingy into an unknown state where the LED is just colorless and I don’t think it advertises as well because I can’t find the device on my nordic phone app. 

    After this, I also compiled just the base project file without making any changes to the code, dropped that .hex file in, still had no change and just put it into an unknown state again which is probably proving what you said about the Thingy:52 SDK files being broken. 

    Now apart from doing the above with gcc, I also did the same with Segger and Keil to no avail.

    P.S. To give you some context on what I’m trying to achieve, I’m trying to send raw 9-axis IMU data (Ax, Ay, Az, Mx, My, Mz, Gx, Gy, Gz) to the existing Nordic phone application via BLE. To do so, I’m assuming I have to write custom firmware functions because I don’t think there’s a way to retrieve the raw 9-axis points with the existing code. I've not had much experience with firmware, so I would appreciate a step by step instruction guide on how to this. 

    Thank you in advance.

Reply
  • I’m not too sure what you mean by the Thingy:52 not being supported by Segger because I was able to compile one of the nRF52-dk example files in Segger just fine and since the nRF52-dk and the Thingy:52 are based on the same microcontroller, shouldn’t the Thingy:52 compile as well? But yes, I think that the Thingy:52 SDK is broken too.

    I downloaded and installed Keil and also opened the Thingy:52 SDK files with Keil. But when I tried to compile using Keil without making any changes to the existing code, the compilation failed yet again with 92 errors and I think all of them were errors that had to do with missing files. But on the other hand, Keil compiled the nRF52-dk example files just fine (as was the case with Segger and gcc compilation).

    Unfortunately, I still can’t get it to work. 

    As for what I’ve done to change the LED color on the Thingy, I initially went to the “m_ui.c” file (https://github.com/NordicSemiconductor/Nordic-Thingy52-FW/blob/master/source/modules/m_ui.c)

    in the Thingy:52 SDK repo on my machine, opened it with a text editor, changed lines 378-380 to be 

    rgb.r = 255;

    rgb.g = 255;

    rgb.b = 255;

    just to make it an obvious all-white color so I’d see a change in the Thingy’s LED. I compiled the file with gcc and it generated a .hex file. I dragged and dropped the .hex file into the JLINK folder popup that comes up when I connect the nRF52-dk to my machine (while having the Thingy:52 connected to the nRF52-dk via a 10-pin cable). For some reason, this puts the Thingy into an unknown state where the LED is just colorless and I don’t think it advertises as well because I can’t find the device on my nordic phone app. 

    After this, I also compiled just the base project file without making any changes to the code, dropped that .hex file in, still had no change and just put it into an unknown state again which is probably proving what you said about the Thingy:52 SDK files being broken. 

    Now apart from doing the above with gcc, I also did the same with Segger and Keil to no avail.

    P.S. To give you some context on what I’m trying to achieve, I’m trying to send raw 9-axis IMU data (Ax, Ay, Az, Mx, My, Mz, Gx, Gy, Gz) to the existing Nordic phone application via BLE. To do so, I’m assuming I have to write custom firmware functions because I don’t think there’s a way to retrieve the raw 9-axis points with the existing code. I've not had much experience with firmware, so I would appreciate a step by step instruction guide on how to this. 

    Thank you in advance.

Children
Related