IAR EMBEDDED WORKBENCH AND J-FLASH

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • IAR EMBEDDED WORKBENCH AND J-FLASH

    Hi , I'm a college student in electronic engineering at the University Of Naples Federico Secondo (Italy) and I've got a big problem.
    I use a Segger J-LINK for real time debugging and it works very fine .
    So now I've finished and fully tested my C code and I've got also an evaluation license for j-flash , but I don't find nowhere the right detailed procedure to program the ARM's flash with the code produced by the Embedded Workbench.
    Does somebody knows how to get a valid file format (bin , motorola , intel etc. etc. ) to program an NXP
    LPC2378 with j-flash with the code produced bythe IAR Embedded WorkBench (the free version ,
    the code size limited I mean)?
    Thank you very much.

    Best regards ,
    Marco Aiello. ?(
  • Hi Marco,

    Simply select another format in the project options dialog.
    • Go to Project\Options (ALT+F7)
    • Click on the Linker item
    • In the Linker\Format group select "Other" and select either
      • raw-binary
      • intel-extended
      • motorola
    • Rename the extension of the output file to the extension J-Flash can read.
      • raw-binary - *.bin
      • intel-extended - *.hex
      • motorola - *. mot

    That's it. :thumbsup:

    Cheers,
    marocprof
  • How to program a Flash on EBI bus

    Hi,

    I have an Atmel CAP9 plateform (ARM 926EJ-S). I've also a SAM-ICE emulator but I don't know how to use it with J-Flash to program the external flash memory on an EBI.

    Thank you for any help.


    Warm Regards,
    ¸¸¸¸¸¸¸¸¸¸¸
    ≈ MFM ≈
  • Hi MFM,

    It's very easy.
    All you have to do is to setup a simple project file.
    Do the following:
    • Open J-FLash
    • Goto File\New Project
    • Now open the project options via Options\Project settings
    • Set both J-TAG speed options to "Adaptive clocking", since the core is an ARM926EJ-S Core.
    • Set in CPU tab
      • Core: ARM7/ARM9
      • Little endian
      • Use target RAM: 00100000; Size 32KByte
      • Init Sequence: Reset;0;0
      • [If you have the PLL initialization sequence, add the steps here]
    • Set in Flash tab:
      • Base Addr: 10000000
      • I assume that you are using one Flash chip with 16bit data width therefore Organization: 16x1
      • Automatically detect flash memory is checked.
    • Click the OK button
    • Try to connect to target.
    • If everything works fine you can program/erase/readback the flash.
    • Save of course :D the newly created project.
    You can find detailed information in the J-Flash manual.

    Cheers,

    marocprof
  • Hi marocprof,

    thanks for the hints, it helped, I'm able now to connect to the device, meanwhile every time I want to do an operation on the flash (test speed, read contents, etc) this message comes out:
    Timeout while checking target RAM, core does not stop
    Failed to read back target memory
    Then the target disconnects.

    Thank you for your support.
  • Hi MFM,

    I found the reason for that.
    1. CPU is running with slow clock.
    2. Watchdog is enabled.

    To make things easier, I made a simple project file that includes everything.
    The correct settings + initialization.
    You can download it from the following location:
    http://www.1webspace.biz/marocprof/AT91CAP9.jflash

    Download the file and open it with J-Flash.
    Let me know if this helps.


    Cheers,
    marocprof
  • Hi marocprof,

    While trying with your project and I was getting:
    Could not find supported CPU core on JTAG chain
    Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 15) @ off 0x5.
    Then after clicking OK a second error message
    Could not find any flash devices
    Failed to connect
    So I simply set both J-TAG speed options to "Adaptive clocking" like you said in your 1st post to get connected to the target.
    Now everything is fine, thank you.

    Warm Regards,
    ¸¸¸¸¸¸¸¸¸¸¸
    ≈ MFM ≈