Jump to content

How to check an uploaded hex file?


tago

Recommended Posts

Hi all,

i compiled my first app (MBNG v1) via make command and successfully uploaded the project.hex file to my STM32F4.

For testing purposes i changed MIOS32_LCD_BOOT_MSG_LINE1  (mios32_config.h) and some other SCS related vars, but i can't see these changes on the device (display).

Maybe i missing some steps? Is it enough to replace the project.hex file? Do i have to run the release.sh script?

Thank you


 

Edited by tago
Link to comment
Share on other sites

Generally you would just need to upload the new hex to the core and it should display the changed text when it boots. I've never known what the release.sh is for, I assumed it was for IDE use. Have you uploaded the pre-compiled hex to make sure the defaults works? I'm not sure about NG, do you have an SD card attached? It may be hanging without a card, but I don't know for sure.

Yogi

Link to comment
Share on other sites

Thanks @yogi

Yes, previously i had the precompiled NG on the core and everything worked as expected. A SD card is attached and working too.

It looks like the old hex file is still there on the core.

Maybe i edited the wrong config in trunk\apps\controllers\midibox_ng_v1\src\mios32_config.h?

Link to comment
Share on other sites

OK, so that kind of leaves the changes you made. mios32_config.h is where the boot string is defined, it gets displayed till the app changes the output to the LCD. Not familiar with NG and when it rewrites the LCD.

 What I usually do is make a copy of a project and place it in a new folder in my MIOS32 directory, alongside the trunk folder. This way I have the original code in 'trunk' and my changed code in the other folder. From then on, I run Make in the edit folder and this produces the new hex in this folder. From MIOS Studio I then upload this hex. I haven't worked on the NG scr but the process has worked well for what I have been working on.

Check that MIOS Studio is pointing to your build. If that is correct then review the changes you made and try only the boot string for a start. The only other thing I can think of is on a few occasions I have made changes to a scr file and run Make, BUT forgot to save my scr changes back to disk. Of course Make built a hex but based on the old scr!  So ' Edit, Save and then Make'. I'm using Notepad++ with the 'NppExe' plugin.

Yogi

Link to comment
Share on other sites

:)

Since i have no idea how to debug my code and no experience in C coding, should i get a proper IDE? How do you trace vars with a text editor and the compiler only? Do you only look at the compiler output during compilation?

Edited by tago
Link to comment
Share on other sites

I can't say that Notepad++ is the best way to work on projects; and if you want to dive into a proper IDE, Eclipse would be my first choice. In Npp you can trace a var to a point, you just have to setup the search. Eclipse would help with organizing your project and auto completion is handy, so getting to know it can speed your coding but it's not going to tell you if your logic is wrong. For this you would need a simulator or ICE tool so you can step through code and see the effect on memory or registers. I think STM does have tools but never looked. I'm a "code; compile; crash; repeat" guy :)

Yogi

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...