I am working on EvaBoard with LX4F232H5QDFIGA3 and I need to lunch the bootloader with ROM_UpdateUSB(pucUSBBootROMinfo),
but at the moment my program doesn't work: help me to understand why?
The SW project is "boot_demo1" of Stellarisware revision 9107 with IAR compiler 6.50.1 .
1) I have modify ROM.h putting
#define ROM_UpdateUSB \
((void (*)(unsigned char *pucDescriptorInfo))ROM_USBTABLE[58])
2) I have modify boot_demo1.icf linker file putting
...region FLASH = mem:[from 0x00000000 ...
intead of ....from 0x00002800...
3) I have modify boot_demo1.c putting
ROM_UpdateUSB(pucUSBBootROMInfo); instead of
(*((void (*)(void))(*(unsigned long *)0x2c)))();
4) I have modify boot_demo1.c putting
unsigned char pucStrings[]=
{
(1 * 2) + 2, // One Language (1 * 2) + 2
USB_DTYPE_STRING,
0x09, 0x04, // Language code for US English.
(17 * 2) + 2, // Size of Manufacturer String.
// "Texas Instruments"
USB_DTYPE_STRING,
'T', 0, 'e', 0, 'x', 0, 'a', 0, 's', 0, ' ', 0, 'I', 0, 'n', 0,
's', 0, 't', 0, 'r', 0, 'u', 0, 'm', 0, 'e', 0, 'n', 0, 't', 0,
's', 0,
(23 * 2) + 2, // Size of Product String.
USB_DTYPE_STRING,
// "Device Firmware Upgrade"
'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0, ' ', 0, 'F', 0,
'i', 0, 'r', 0, 'm', 0, 'w', 0, 'a', 0, 'r', 0, 'e', 0, ' ', 0,
'U', 0, 'p', 0, 'g', 0, 'r', 0, 'a', 0, 'd', 0, 'e', 0,
(3 * 2) + 2, // Size of Serial Number.
USB_DTYPE_STRING,
// "1.0"
'1', 0, '.', 0, '0', 0
};
unsigned char pucUSBBootROMInfo[]=
{
0xbe, 0x1c, // Stellaris VID
0xff, 0x00, // Stellaris DFU PID
0x00, 0x02, // USB version 2.0
0x00, // 0mA of Bus power
0xC0, // Self powered using no bus power
pucStrings // Address of the string table
};
BUT IAR does ERROR:
because " pucStrings " isn't a unsigned char !!
I try to substitute the values of pucStrings inside pucUSBBootROMInfo[] and IAR say OK.
Then I download the executable on F232 by IAR I-jet via JTAG and run in debug mode:
the program don't run in right way...!!
Where is the problem ?
tks