1 2 3 Previous Next 42 Replies Latest reply: Mar 31, 2014 8:22 AM by FreescaleTools_and_Software Go to original post RSS
  • 30. Re: Freescale FRDM-KL25Z Freedom Board (Questions and Answers)
    FreescaleTools_and_Software Level 8

    Habtamu Tolera: When in bootloader mode, you cannot use the board with the debugger. The only thing the board can do is load new OpenSDA applications. You must unplug, and then re-plug in the board before the debug OpenSDA application will begin running (as you've have seen in your tests).

     

    The error about the missing memory configuration file is likely an issue with the particular project not being able to find the .mem configuration file, and is not related to OpenSDA. To check to see where your project thinks that file is at, bring up the Debug Configuration window (Run > Debug Configurations) and select the debug configuration you are using. On the "Main" tab, there should be a box that says "Connection". Click on the Edit  button next to it. That will bring up another dialog box which will have a "Target" field. Click on the "Edit..." button next to that field, which will bring up another dialog box. In that dialog box, there will be two tabs labeled "Initialization" and "Memory". Make sure the paths to the .tcl and .mem files are correct on those tabs, as that is likely where the issue is. The correct path will depend on the particular project you are using, but hopefully it'll be somewhat obvious what the error is (perhaps a hard coded address) so that you can point it to the correct address on your hard drive.

     

    Prajas John: After you have loaded the CMSIS-DAP application (and then unplugged and re-plugged in your board so that the CMSIS-DAP application begins to run then), you will no longer see anything in Windows Explorer. You will also not see the green LED turn on, except for a short blink immediately after pluggging in the board. You can follow this Keil app note for setting up a Keil project to use OpenSDA, as by default the sample code still uses the PEMicro connection. Which on a related note, you can also use the P&E Micro debugger OpenSDA app to debug with Keil as well, so you are not required to use the CMSIS-DAP debug app.

  • 31. Re: Freescale Freedom Development Platform (Questions and Answers)
    FreescaleTools_and_Software Level 8

    I'd also like to warn anyone using Windows 8.1 that the FRDM Bootloader will not download new applications successfully. It will enumerate as a mass storage device like normal, but when copying the new app to the board (like the MSD or debug apps), the download will fail.

     

    We're working with P&E to see what types of solutions are available to get it working again on Win 8.1. Also note that the board still works correctly with all other operating systems (even Windows 8.0).

  • 32. Re: Freescale Freedom Development Platform (Questions and Answers)
    mconners Level 11

    Freescale Tools_and_Software wrote:

     

    Also note that the board still works correctly with all other operating systems (even Windows 8.0).

     

    Should this be "all other versions of Windows", cause I don't think the bootloader works with linux.

     

    Mike

  • 33. Re: Freescale Freedom Development Platform (Questions and Answers)
    mconners Level 11

    To clarify, once you update the firmware, the flash programming mode works in linux, but not bootloader mode.

     

    While you're working with P & E why not figure that out as well? :-)

     

     

    Mike

  • 34. Re: Freescale Freedom Development Platform (Questions and Answers)
    estellrum Level 1

    Hi,

     

    I just got my KL25z board this week, and I was going through all the startup guides and got the precompiled srec files working on the board.

     

    I am wondering if anyone can point me to a guide to get the OOTB demo source code given in the KL25z sample code  folder working, i.e. making the Project in Code Warrior 10.5.

     

    I am looking at this folder:

     

    C:\...\workspace\KL25 Sample Code\kl25_sc_rev10\klxx-sc-baremetal\src\projects\FRDM_KL25ZDemo

     

    as these are just the source, i cant import it into Code Warrior. I have tried for hours now, trying to put the source files into a new Project, but to no avail, there is always some error ... i stopped when the errors grew from 13 to 90 ...

     

    Does anyone have a working Code Warrior Project folder for the out of the box demo sample?

     

    many thanks in advance.

     

    Estellrum

  • 35. Re: Freescale Freedom Development Platform (Questions and Answers)
    thachngo Level 1

    I'm trying to create an emulation EEPROM for KL25Z-FRDM (using CW 10.5). But I can not find out the "Use user memory areas" selection to config Flash component.

    1.png

  • 36. Re: Freescale Freedom Development Platform (Questions and Answers)
    FreescaleTools_and_Software Level 8

    Michael:

      There was an update a few months back to get even the app bootloader to work under Linux, and newer Freedom boards come with that firmware already loaded (and thus work with Linux out of the box). P&E is making further improvements though, and the firmware update for older FRDM boards is not currently available for download on their website, but it should be up "within a few days". I'll post when that becomes available.

     

    They're also still working on getting Windows 8.1 to work. The problem is unintended untyped writes by Windows 8.1, and filtering those out from desired writes by doing the drag-and-drop. They're working on patching that up, but did not have a date yet for that support.

     

    Kevin:

      The bare-metal CW10 project files can be found in \klxx-sc-baremetal\build\cw. However you'll probably notice that there are not CW project files for all the project source available. Instead the focus for CW was put on Processor Expert, which you can find those projects in the \kl25_sc_rev9\klxx-sc-pex\projects folder.

     

      If you still want to bring in the bare-metal projects though into a CW10 project, I would recommend taking one of the pre-existing CW10 bare-metal projects, and bringing in the source files into that, rather than creating a brand new CW10 project. The errors you were seeing were very likely due to it not having the paths properly set to find all the header and C files, and the pre-done CW10 projects will have that already setup.

     

    Thạch:

      I'd need to look into that more, but maybe someone can help point you in the right direction in the meantime.

  • 37. Re: Freescale Freedom Development Platform (Questions and Answers)
    FreescaleTools_and_Software Level 8

    The P&E apps are now updated to support both Linux and Mac. Unfortunately you will still need to find a Windows 7/XP/8.0 computer first in order to load the bootloader firmware update, but after that one initial time, you can use it with Linux without a problem. Note that Windows 8.1 support is still being worked on.

     

    Detailed OpenSDA bootloader firmware upgrade instructions:

    1. Download the latest OpenSDA Firmware Apps zip, then extract the OpenSDA_Bootloader_Update_App_v110_2013_11_19.zip inside it to get access to BOOTUPDATEAPP_Pemicro_V110.SDA
    2. Also read the BOOTUPDATEAPP_release_notes.txt file
    3. Hold down the reset button on your FRDM board
    4. While holding it down, plug in the board, and then release the reset button
    5. The board will enumerate as BOOTLOADER
    6. Explore the new drive, and double click on SDA_INFO.HTM to see your current firmware revision. Newer FRDM boards already have the necessary revision to work on Linux out of the box.
    7. Drag and drop the BOOTUPDATEAPP_Pemicro_V110.SDA file to the BOOTLOADER drive
    8. After it finishes copying, unplug the FRDM board, and then replug it back in. This is the point is where the bootloader firmware is updated.
    9. Wait for it to enumerate as a drive labeled BOOTLOADER (this will happen automatically and reset should not be held down during this process)
    10. Open up the drive and double click on SDA_INFO.HTM to ensure the bootloader is now updated to 1.10
    11. The bootloader firmware update process will erase the previous OpenSDA application you had loaded, so you will need to load it again using the standard application loading process.
      1. Unplug the board
      2. Hold the reset button
      3. Plug in the board while holding reset
      4. See it enumerate as BOOTLOADER and let go of the reset button
      5. Drag and drop the appropriate application (such as MSD-FRDM-KL26Z_Pemicro_v112.SDA for the FRDM-KL26Z board I have)
      6. Wait for it to copy
      7. Unplug, then replug in the board, and now the MSD app will run (you will see a FRDM-KL26Z drive come up)
  • 38. Re: Freescale Freedom Development Platform (Questions and Answers)
    mconners Level 11

    Great news. Another thing to be thankful for :-)

     

    MIke

  • 39. Re: Freescale Freedom Development Platform (Questions and Answers)
    mconners Level 11

    I finally got around to trying the newest version of firmware (12/13/13) on linux. Worked great. Thanks.

     

    Mike

  • 40. Re: Freescale Freedom Development Platform (Questions and Answers)
    FreescaleTools_and_Software Level 8

    Windows 8.1 now works with the new v1.11 (BOOTUPDATEAPP_Pemicro_v111.SDA) bootloader firmware. Use the same instructions as above to update the firmware on a non-Windows 8.1 computer.

     

    The new v1.14 MSD app (the MSD-DEBUG-FRDM-<board_name>_Pemicro_v114.SDA file) was updated as well to support Windows 8.1. It also now does the Mass Storage Device (MSD) programming, Debug, and CDC Serial communication all in the same app. There's no longer a need to switch between the MSD and Debug apps.

  • 41. Re: Freescale Freedom Development Platform (Questions and Answers)
    mbiuki Level 1

    I did the same thing but the erase function is not working!

    I did this:

     

    data = 0x11;

      ADDR = ((SHARED_MEM_SPACE << 16) | ALT3CONF_SECTOR<<4| ALT3CONF1); //this is my macro definition for address

      printf("ADDR = 0x%x\n", ADDR);

      ProgramFlash_Write(Program_Flash, &data, ADDR, sizeof(data));

      do {

      ProgramFlash_Main(Program_Flash);

      OpStatus = ProgramFlash_GetOperationStatus(Program_Flash);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

     

      ProgramFlash_Read(Program_Flash, ADDR, &data, sizeof(data));    /* Start reading from the flash memory */

      do {

      ProgramFlash_Main(Program_Flash);

      printf("here\n");

      OpStatus = ProgramFlash_GetOperationStatus(Program_Flash);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

     

      printf("data read is = 0x%x\n", data);

     

      ProgramFlash_Erase(Program_Flash, ADDR, 2048);

      do {

      printf("yes\n");

      ProgramFlash_Main(Program_Flash);

      OpStatus = ProgramFlash_GetOperationStatus(Program_Flash);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

     

     

      ProgramFlash_Read(Program_Flash, ADDR, &dump, sizeof(data));    /* Start reading from the flash memory */

      do {

      ProgramFlash_Main(Program_Flash);

      printf("yes2\n");

      OpStatus = ProgramFlash_GetOperationStatus(Program_Flash);

      } while (!((OpStatus == LDD_FLASH_IDLE) | (OpStatus == LDD_FLASH_FAILED)));

     

      printf("dump read is = 0x%x\n", dump);

     

     

     

    and I am reading this:

     

     

    ADDR = 0x12811

    here

    here

    data read is = 0x11

    yes

    yes2

    yes2

    dump read is = 0x11

     

     

     

     

    I also set the user space in flash, but not sure if that matters:

    userspace.PNG

    initflash.PNG

     

    do you have any idea why mine is not erasing?!!

  • 42. Re: Freescale Freedom Development Platform (Questions and Answers)
    FreescaleTools_and_Software Level 8

    Hi Mehdi,

      I saw you figured out the issue on the Freescale community. I've repasted your answer below for anyone who is also looking for the answer:

     

    Mehdi

    https://community.freescale.com/message/387507#387507

    It is working now, I had to edit my routines, it looks something like this now:

     

    in events.c:

    /* ===================================================================*/

    void ProgramFlash_OnOperationComplete(LDD_TUserData *UserDataPtr)

    {

             uint8_t *OpStatus = (LDD_TUserData*) UserDataPtr;

         *OpStatus = TRUE;

    }

    -----------------------------

    bool ReadFlash(LDD_TDeviceData *DeviceData, LDD_FLASH_TAddress FromAddress, LDD_TData* DataPtr, LDD_FLASH_TDataSize Size, uint8_t* OpStatus)

    {

      LDD_TError Error;

      *OpStatus = FALSE;

      Error = FLASH_Read(DeviceData, FromAddress, DataPtr, Size);

      if (Error) {

        return FALSE;

      }

      do{

        FLASH_Main(DeviceData);

      }

      while(FLASH_GetOperationStatus(DeviceData) != LDD_FLASH_IDLE);

      return TRUE;

    }

     

    bool WriteFlash(LDD_TDeviceData *DeviceData, LDD_TData* DataPtr, LDD_FLASH_TAddress FromAddress, LDD_FLASH_TDataSize Size, uint8_t* OpStatus)

    {

      LDD_TError Error;

      *OpStatus = FALSE;

      Error = FLASH_Write(DeviceData, DataPtr, FromAddress, Size);

      if (Error) {

        return FALSE;

      }

      while(*OpStatus != TRUE); /* Wait while operation done */

      return TRUE;

    }

     

    bool EraseFlash(LDD_TDeviceData *DeviceData, LDD_FLASH_TAddress FromAddress, LDD_FLASH_TDataSize Size, uint8_t* OpStatus)

    {

      LDD_TError Error;

      *OpStatus = FALSE;

      Error = FLASH_Erase(DeviceData, FromAddress, Size);

      if (Error) {

        return FALSE;

      }

      while(*OpStatus != TRUE); /* Wait while operation done */

      return TRUE;

    }

     

    int main(void)

    {

      /* Write your local variable definition here */

      LDD_TDeviceData *FlashDevData;

      uint8_t OpStatus;

      bool err;

      uint8_t data[256];

      uint8_t buffer[256];

      /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

      PE_low_level_init();

      /*** End of Processor Expert internal initialization. ***/

     

      /* Initialization of FLASH controller */

      FlashDevData = FLASH_Init(&OpStatus);

     

      printf("*********************************************************\n\r");

      printf("*** DEMO project for the FLASH component - begin\n\r");

      printf("*********************************************************\n\r");

      printf("\n\r");

      printf("Project description:\n\r");

      printf("Flash memory erase, write, read example.\n\r");

      printf("\n\r");

      /* Step 0 */

      printf("+++ Step 0 - begin +++\n\r");

      printf("Description: Erase FLASH memory sector\n\r");

      err = EraseFlash(FlashDevData, FLASH_USER_AREA0_UserData_ADDRESS, FLASH_USER_AREA0_UserData_SIZE, &OpStatus);

      if (err) {

        printf(" Erase PASSED\n\r");

      }

      else {

        printf(" Erase FAILED\n\r");  

      }

      printf("+++ Step 0 - end +++\n\r"); 

      /* Step 1 */

      printf("+++ Step 1 - begin +++\n\r");

      printf("Description: Write data to FLASH memory sector\n\r");

      memset(&data, '#', sizeof(data)); /* Fill the data[] with '#' characters */

      if (err) {

        err = WriteFlash(FlashDevData, &data, FLASH_USER_AREA0_UserData_ADDRESS, sizeof(data), &OpStatus); /* Write data[] to FLASH */

      }

      if (err) {

        printf(" Write PASSED\n\r");

      }

      else {

        printf(" Write FAILED\n\r");

      }

      printf("+++ Step 1 - end +++\n\r"); 

      /*Step 2 */

      printf("+++ Step 2 - begin +++\n\r");

      printf("Description: Read and verify the written data\n\r");

      if (err) {

        err = ReadFlash(FlashDevData, FLASH_USER_AREA0_UserData_ADDRESS, &buffer, sizeof(buffer), &OpStatus); /* Read FLASH memory */

      }

      if ((err) && (!memcmp(&buffer, &data, sizeof(buffer)))) { /* Verify written data */

        printf(" Read PASSED\n\r");

      }

      else {

        printf(" Read FAILED.\n\r");

      }

      printf("+++ Step 2 - end +++\n\r"); 

      printf("\n\r");

      printf("*********************************************************\n\r");

      printf("*** DEMO project for the Flash component - end\n\r");

      printf("*********************************************************\n\r");

     

    -------------

1 2 3 Previous Next