Jump to content
msptest6

Porting ELM-Chan FatFS to the C2000

Recommended Posts

I tried to compile the full version of Elm-Chan's fatfs code to the F28027. Looks like I ran out of memory:

 

"../28027_RAM_lnk.cmd", line 114: error #10099-D: program will not fit into available memory. placement with alignment/blocking fails for section ".text" size 0x18d0 page 0. Available memory ranges:
PRAML0	 size: 0x900	 unused: 0x900	 max hole: 0x900	

 

Looks like I'll have to try Petiti FatFS code, to make it fit in the launchpad.

Share this post


Link to post
Share on other sites

Can you merge RAMM0 and PRAML0?

 

MEMORY
{
PAGE 0 :
/* For this example, L0 is split between PAGE 0 and PAGE 1 */
/* BEGIN is used for the "boot to SARAM" bootloader mode */

BEGIN : origin = 0x000000, length = 0x000002
RAMM0 : origin = 0x000050, length = 0x0003B0
PRAML0 : origin = 0x008000, length = 0x000900
RESET : origin = 0x3FFFC0, length = 0x000002

IQTABLES : origin = 0x3FE000, length = 0x000B50 /* IQ Math Tables in Boot ROM */
IQTABLES2 : origin = 0x3FEB50, length = 0x00008C /* IQ Math Tables in Boot ROM */
IQTABLES3 : origin = 0x3FEBDC, length = 0x0000AA /* IQ Math Tables in Boot ROM */

BOOTROM : origin = 0x3FF27C, length = 0x000D44


PAGE 1 :

/* For this example, L0 is split between PAGE 0 and PAGE 1 */
BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
DRAML0 : origin = 0x008900, length = 0x000700
}

 

Hmm.. This is a RAM config, correct? RAM does not look contiguous, so you may not be able to run the full version, but what if you try it with a flash config?

Share this post


Link to post
Share on other sites

Hmm.. This is a RAM config, correct? RAM does not look contiguous, so you may not be able to run the full version, but what if you try it with a flash config?

Good point.. I'll try that.

Share this post


Link to post
Share on other sites

Ok.. I give up. This will not work because it won't fit. The only way to go about this is via petite fatfs which has a smaller memory footprint. The only big disadvantage of that is that the file needs to be created on a PC first.

Share this post


Link to post
Share on other sites

Really? I would think it would fit in with the F28027.cmd linker file. Have you tried moving FlashB from Page 1 to Page 0 and allocating .text there as well?

Will try this when I get home.

Share this post


Link to post
Share on other sites

Blue,

I've got the SD booster, but I'm having trouble figuring out what goes where...silkscreening could definitely be improved on this board. I found the pdf schematic, but not the design files. Could you track down the SCH and BRD file?

Share this post


Link to post
Share on other sites

Blue,

I've got the SD booster, but I'm having trouble figuring out what goes where...silkscreening could definitely be improved on this board. I found the pdf schematic, but not the design files. Could you track down the SCH and BRD file?

Yes, definitely can be improved. One quick thing to do is route the breakout pins to the the headers and unjump the solder jumpers. I'll send you the files when I get home.

43oh_MSP430_Launchpad_SDCard.zip

Share this post


Link to post
Share on other sites

How did you work around the lack of an 8-bit type of the C2000 ?

 

I wanted to port ELM-Chan FatFS on the similar C5000 DSP (which also has 16-bit char type), but gave up when I saw that it accessed most of the FAT structures as byte arrays...

 

Note that the C5000 does not have the __byte() intrinsic.

Share this post


Link to post
Share on other sites

Well, we don't actually have FatFS running on this yet.  I've been meaning to do the port, but just haven't had the time. 

 

Thanks for the quick reply Trey.

 

Do you plan to port it in a way that would make it also run on the C5000 DSP? (the 8/16 bit type problem I mentioned)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...