cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie: Migration from working project (IAR+JTAG) to standalone hardware?

okelly2
Associate II
Posted on October 17, 2008 at 17:47

Newbie: Migration from working project (IAR+JTAG) to standalone hardware?

8 REPLIES 8
okelly2
Associate II
Posted on May 17, 2011 at 12:48

Hi all,

I have a project that works fine in the development environment, but it does not work after I close the debug session (in IAR kickstart + STM3210-E dev board). I don't know if this is a programming issue, or an IDE setup issue. Every project must eventually be ''unplugged'' from the development environment, and I'm not sure what are the general issues to consider.

My program flashes the LEDs on the development board once, then loops indefinitely. My experimental results are

Experiment 1: IAR IDE running. Code is downloaded (stops in ''main''). In IDE select ''Go''. LEDs flash.

Experiment 2: IAR IDE running. Code is downloaded. ''Go''. LEDs flash. Press ''Reset'' button on the board. LEDs flash again.

Experiment 3: IAR IDE running. Code is downloaded. ''Go''. LEDs flash. In IAR, select Debug/Stop debugging. Press ''Reset'' button on the board. LEDs do NOT flash.

There are no active breakpoints in the IAR project as far as I know.

The Reset behaviour in Project/Options/J-Link is set to ''Normal''.

With an active Debug session, IAR/Debug/Reset brings me to address

__iar_program_start: 08005784 F000F896 BL

Many thanks for pointers and suggestions.

Regards,

Owen

I do not understand how to ''unplug'' the JTAG

jj
Associate II
Posted on May 17, 2011 at 12:48

After the IAR IDE reports, ''Flash Programming Complete'' we usually ''Go'' as you describe and see if our code change worked. If all is good - hit Stop Debugging and then power down. At this point you can disconnect your JLink from the Eval Board. Now - with NO connection between IDE and your board - your code should run correctly upon power restore.

Give this a try and report...

okelly2
Associate II
Posted on May 17, 2011 at 12:48

Good suggestion. Unfortunately the behaviour is as before: press reset, LEDs don't flash.

(BTW, is the J-link sensitive to which order you plug it in, or whether the board is powered? I only know that USB end of J-link is hot-swappable, and I have been assuming that the board-to-JTAG connection is not. )

I wonder if the 'reset' problem has to do with NVIC?

Or if I need to find a build option that leaves out all of the IAR machinery? (Though the method you use would suggest that the build is not the problem.)

-Owen

jj
Associate II
Posted on May 17, 2011 at 12:48

IAR provides a detailed, multi-page write-up on the JLink (hook-up & operation). Our method is to plug JLink into target - both unpowered. We then power the target (JLink connected to target but not to USB-PC) and the target runs as normal. When we plug the USB cable into JLink the JLink Commander ''finds'' both the JLink and our STM32 target - provides operational data.

You've reviewed/understood Boot 0 & 1? Under IAR's options you must check program flash. This is a multi-page, multi-selection series of menus.

Our version IAR 5.20 nicely reports what its doing as it downloads to flash. Perhaps you can get some clue there. Since your code runs while debugging perhaps you are downloading to SRAM? Removal of power would explain your loss of program in that instance.

jj
Associate II
Posted on May 17, 2011 at 12:48

You call your board, ''STM3210-E dev board.'' By this do you mean the newest, TFT color Lcd, EVAL-E board - with FSMC STM32?

If so - Boot 0, Boot 1 should be clearly marked - and explained in the accompanying manual. (my version of this board was mis-shipped - I'm guiding you from my use of earlier B Eval board)

Staff have all boards in use now - later when they escape I'll get you exact detail of required IAR option which insures you are programming the flash. Your capture of the download will be helpful.

okelly2
Associate II
Posted on May 17, 2011 at 12:48

Thank you for your help.

I am using EWARM 5.20 also.

What you describe is also how I use J-link (but I was wondering if I was being over-cautious, apparently not).

I do know about Boot 0 and 1 pins, is there any connection to IAR, or is my cue here to check the dev board schematic so that I know the meaning of pressing the ''Reset'' button on the board. I will do that.

I have IAR/options/Debugger/Download set to ''Use flash loader(s)'' and the text box reads ''....(default).''. Is that sufficient to ensure the project is not running from SRAM?

Regarding messages during flash download, I will capture some of what I see in the ''Debug Log'' and post that ASAP (tommorrow). My project is broken at the moment, waiting on a colleague.

Regards,

Owen

okelly2
Associate II
Posted on May 17, 2011 at 12:48

okelly2
Associate II
Posted on May 17, 2011 at 12:48