10 years, 2 months ago.

How to config Keil uvision for mbed?

How to config Keil uvision for mbed?

It is easy to export program from mbed but how to config Keil uvision 4/5 to buid target and compile to trouble shoot or find bugs?

Mbed is just compile and show errors but can not show where is the bugs ?

How to develop a program without debug tool in mbed?

2 Answers

daniel k
poster
10 years, 2 months ago.

Thanks for the answer but it is more complex than just right click export to Keil. I tried created new project and built target with nxp 1768 but Keil did not regconize what is "mbed.h" on the head file?

Accepted Answer

Can you explain how you are doing it exactly? Because that really is it. I just tested it to be sure:

  • New program for LPC1768 (blinky).
  • Right mouse button on it, export program, keil uVision4 (I got 5 myself, works fine).
  • Save download, extract zip to nice location
  • Open extracted location, double click the mbed_blinky uvision project file
  • uVision opens with the project
  • Project -> build/rebuild all
  • 0 warning, 0 errors
  • The build folder in the just created project folder now contains mbed_blinky_LPC1768.bin
posted by Erik - 22 Feb 2014

Thanks Erik It works fine now for blinky, 0 error. Will try to trouble shoot other programs if uvision can give a hint at error location like eclipse ide.

posted by daniel k 22 Feb 2014
10 years, 2 months ago.

Well you can get quite far by using printf for debugging. However there are good reasons to go to an offline toolchain such as Keil. Easiest is to just press right mouse button on your program, export. Select Keil, and you can download a project folder with everything setup, so you immediatly get mbed + all your other code files in a project.

If you want to start directly in Keil, simply export a blinky program, and use that as template.

I have been trying to go offline for months now, mbed-cli, keil, embitz, eclipse I cannot get mbed to compile and printf to work under any IDE. is there an example somewhere that does work offline ? I am getting more familiar with Keil now. uV5 is my currently preferred IDE. I have made my own putc and puts, but how do I link that into stdio ? Which is the best forum to use ? thanks in advance, if you have some time to help.

posted by Nick Marsh 14 Jan 2017

By making it a class and inheriting the Stream class. However that is the same as Serial does, so if that does not work, I doubt it will work with your own version.

posted by Erik - 14 Jan 2017

Thanks for this info. I am trying to do a simple export into Keil, but I cannot find where the online tool has saved the .zip file on my PC. All the references I have found stop after selecting the the proper offline IDE and selecting export but when I do this I don't get a prompt to save the files.

Thanks, Stephen

posted by Stephen Davis 23 Feb 2017