This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trying to get RL-FlashFS working on LPC2300

I'm building some code to read the SD Card on an MCB2300.   I'm using the RL-FlashFS library.

I have configured CCLK to 48MHZ and PCLK_MCI to CCLK, and changed the #defines in MCI_LPC23xx.c to read:

#define __MCLK    48000000
#define __CPUCLK  48000000

My code to initialise the card reads:

	uint32_t retv = finit(NULL);

The SD LED on the MCB2300 board comes on when the call is made and then there's a *long* pause and eventually the function returns a value of 2.

I'm using 4.74 of the library and uVision 5

Help please, I am totally baffled.

Thanks, David

Parents
  • Some comments from my side:

    Memory mismatch! Address: 0x00000058 Value = 0x90 Expected = 0xFC

    The µVision option 'Update Target before Debugging' in the dialog 'Options for Target - Utilities' did not exist in early versions of µVision 4 and therefore this option is also not set when you work with µVision 5. With these old projects, you always need to download the generated code manually after you build it and before you start a debug session.

    I don't have a serial port on my PC - it's way too recent for that, so I'll just have to run under the debugger as far as I can (once I get past this issue)

    Sure, you can run it in the debugger as well, but you could also use a USB to RS232 converter. These devices are a available for a few Euro/Dollar.

    When I debugged through that I got retv of 2 as previously.

    How did you format the SD Card? Only FAT is supported, no ExFAT or NTFS or others. Please see the description of the error codes in the manual:

    https://www.keil.com/support/man/docs/rlarm/rlarm_finit.htm

    Of course the V3.21 code won't compile:

    Old versions of configuration files are often incompatible. Please use the one that came with the example and adapt it if necessary.

    PS One BIG difference from my project that I see it this one is building for Thumb mode and using FS_ARM_L.lib while I am building for ARM mode and using FS_ARM_LA.lib.  Don't know how critical that is?

    If your application is built in Arm mode, you should also use libraries built in Arm mode. Here is a complete listing of RL-ARM library files:

    www.keil.com/.../rlarm_lib_files.htm

Reply
  • Some comments from my side:

    Memory mismatch! Address: 0x00000058 Value = 0x90 Expected = 0xFC

    The µVision option 'Update Target before Debugging' in the dialog 'Options for Target - Utilities' did not exist in early versions of µVision 4 and therefore this option is also not set when you work with µVision 5. With these old projects, you always need to download the generated code manually after you build it and before you start a debug session.

    I don't have a serial port on my PC - it's way too recent for that, so I'll just have to run under the debugger as far as I can (once I get past this issue)

    Sure, you can run it in the debugger as well, but you could also use a USB to RS232 converter. These devices are a available for a few Euro/Dollar.

    When I debugged through that I got retv of 2 as previously.

    How did you format the SD Card? Only FAT is supported, no ExFAT or NTFS or others. Please see the description of the error codes in the manual:

    https://www.keil.com/support/man/docs/rlarm/rlarm_finit.htm

    Of course the V3.21 code won't compile:

    Old versions of configuration files are often incompatible. Please use the one that came with the example and adapt it if necessary.

    PS One BIG difference from my project that I see it this one is building for Thumb mode and using FS_ARM_L.lib while I am building for ARM mode and using FS_ARM_LA.lib.  Don't know how critical that is?

    If your application is built in Arm mode, you should also use libraries built in Arm mode. Here is a complete listing of RL-ARM library files:

    www.keil.com/.../rlarm_lib_files.htm

Children