cancel
Showing results for 
Search instead for 
Did you mean: 

USB Low-Full-High Speed Peripherals

frank
New Contributor II

I new a project from FX3 SDK suit for bulk example by using SDCC

The example code work well.

It doesn't use any xdata setting

The mem file show as below

Name Start End Size Max
---------------- -------- -------- -------- --------
PAGED EXT. RAM 0 256
EXTERNAL RAM 0 65536
ROM/EPROM/FLASH 0x0000 0x0eae 3355 65536

 

I modify the code to add a variable in xdata and add the link option "--code-loc 0x0 --xram-loc 0x2000"

so the mem file show

Name Start End Size Max
---------------- -------- -------- -------- --------
PAGED EXT. RAM 0 256
EXTERNAL RAM 0x2000 0x2000 1 65536
ROM/EPROM/FLASH 0x0000 0x0eb4 3361 65536

But It can't work

What's miss I seeting

 

0 Likes
1 Solution
MallikaK_22
Moderator
Moderator

Hi,

The linker command you have used does not seems correct: --code-loc 0x0 --xram-loc 0x2000.

An example of the linker command is: --xram-loc <value>--code--size <limit>.  <value> is the address where the XSEG needs to be placed after the code area.  <limit> is the code size limit, so that the xstack can be placed after the code area without any overlap. 

Please refer to this KBA: https://community.cypress.com/t5/Knowledge-Base-Articles/FX2-FX2LP-SDCC-Eclipse-Project-Interrupt-no... 

Regards,

Mallika 

Mallika

View solution in original post

0 Likes
1 Reply
MallikaK_22
Moderator
Moderator

Hi,

The linker command you have used does not seems correct: --code-loc 0x0 --xram-loc 0x2000.

An example of the linker command is: --xram-loc <value>--code--size <limit>.  <value> is the address where the XSEG needs to be placed after the code area.  <limit> is the code size limit, so that the xstack can be placed after the code area without any overlap. 

Please refer to this KBA: https://community.cypress.com/t5/Knowledge-Base-Articles/FX2-FX2LP-SDCC-Eclipse-Project-Interrupt-no... 

Regards,

Mallika 

Mallika

View solution in original post

0 Likes