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

compiling mcb2300 usb examples in GCC

Hi All,

I downloaded the Keil USB Examples for the MCB2300 board on the website. All examples worked well (except USBMem, because of the 16 kb limit for the evaluation version) when with the default compiler.

I adapted the code to work with the GCC compiler (that also came with the evaluation tools), but I had problems:

When I run the examples, Windows XP "almost" recognizes the board (almost = you hear the "dong-ding" but the "USB Device not recognized" little window popped up).

I suspect I made some mistakes on the 'translation' ; something with the __packed & __inline keywords.

1) Does anybody have a clue about what is happening?

2) I translated __packed to __attribute__(__packed__)) , but had to put the keyword after "struct" (when I left it at the left of struct I got a warning saying that __packed__ was ignored. And the device did not even made XP do the "dong-ding". Is this correct? I read in somewhere that in GCC even if you pack a structure or every item on the structure, the structure itself has its size aligned (even if the members inside are packed).

3) __inline is the same as "static" ? (I defined a macro #define __inline static ), Is this correct?

Thank you very much for any help!!
Sergio P. Sider