[Qbs] [baremetal] I looking proffesionals faced with Cypress FX2 && IAR
richard at weickelt.de
Fri Oct 18 23:02:28 CEST 2019
> Currently it does work with Keil C51 compiler && SDCC compiler. But, it does> not work with an IAR 8051 compiler.
I guess you do not have JTAG access to this device and can step-debug. But
it looks like you have GPIOs that you could access with a logic analyzer.
> I don't know why, but the USB enumeration fails, the OS can't fetch the USB
> descriptors from the FW. e.g. at attempt to fetch the USB "Device
> Descriptor", the OS receives a zero data.
I haven't reviewed Your code, but here are some ideas:
- interrupt tables not correctly initialized
- missing volatile qualifier in variables shared between task and interrupt
context. This is a common mistake, especially when one side uses this
variable in a loop (task waiting for a flag) and never observes a change
because the variable value is kept in a register.
> Maybe, someone can help me? Because I have not ideas why it does not work
> with IAR.
Possible strategies when you cannot debug with JTAG:
- use a GPIO and a logic analyzer to output serialized data at certain
checkmarks to see whether the program works correctly.
- decompose your application, make sure that the peripherals are working one
> PS: A google has not any mention or example at using this chip && IAR compiler.
And that makes me wonder if you are the only person on the planet trying to
do this. This looks like a hobby project. Is IAR even used among hobbyists?
If you want to show-case multi-toolchain development with Qbs, why 8051? I
doubt that any company uses 8051 for new projects. At least, companies would
build upon a large legacy codebase and infrastructure (we have done this for
30 years...) . Why should anybody invest time in using Qbs on 8051?
However, your project looks exotic enough to be fun :)
More information about the Qbs