tago Posted February 9, 2017 Report Share Posted February 9, 2017 (edited) 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 February 9, 2017 by tago Quote Link to comment Share on other sites More sharing options...
yogi Posted February 9, 2017 Report Share Posted February 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
tago Posted February 9, 2017 Author Report Share Posted February 9, 2017 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? Quote Link to comment Share on other sites More sharing options...
yogi Posted February 9, 2017 Report Share Posted February 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
tago Posted February 9, 2017 Author Report Share Posted February 9, 2017 Thank you yogi. I did a copy of NG too and edited the code there. Meanwhile i found the very stupid problem. I simply did not save the mios32_config.h file. I used sublime text to edit the files and there was no auto saving enabled. Sorry! Quote Link to comment Share on other sites More sharing options...
yogi Posted February 9, 2017 Report Share Posted February 9, 2017 :) Welcome to the club :) Quote Link to comment Share on other sites More sharing options...
tago Posted February 9, 2017 Author Report Share Posted February 9, 2017 (edited) :) 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 February 9, 2017 by tago Quote Link to comment Share on other sites More sharing options...
yogi Posted February 9, 2017 Report Share Posted February 9, 2017 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 Quote Link to comment Share on other sites More sharing options...
Psykhaze Posted February 9, 2017 Report Share Posted February 9, 2017 i'd recommand Code::Blocks , Cross-Platform and Easy to interface with any compilers Quote Link to comment Share on other sites More sharing options...
jojjelito Posted February 12, 2017 Report Share Posted February 12, 2017 (edited) I use IntelliJ a lot at work these days, as I *gasp* turned out to be an occasional Java hacker. It turns out that JetBrains has a similar IDE for C/C++ out - https://www.jetbrains.com/clion/ and it looks promising so far. Edited February 13, 2017 by jojjelito Quote Link to comment Share on other sites More sharing options...
tago Posted February 13, 2017 Author Report Share Posted February 13, 2017 IntelliJ IDEA is a good IDE, but for CLION unfortunately there isn't a free community edition. I'd like to try Visual Studio but it takes too (for me) much disk space to install. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.