There is just a firmware framework running on FX3 so your usage of the word hardware driver is little confusing. Are you talking about the threadX running on it?
No, I mean the FX3-firmware framework including the API's provided by Cypress!
The firmware framework IS the TheadX real time operating system running on the ARM core extended by the Cypress USB API functions.
However it is called, but does anybody know how much memory the framework occupies roughly?
No one any idea?
The size of .txt + .data - sections of the FX3-framwwork I assume to be ~130KB by compiling the simple bulk loop auto - example.
But what about the size of the dynamic memory (stack, heap etc.) the FX3-framework uses?
I am also interested to know the maximum buffer size for the DMA channels. As long as I use equal or less than 128 kB for my DMA buffers it is working fine. However, as soon as I try to use more, the FX3 won't enumerate anymore.
On the other hand there are 512 kB RAM, where the application code uses roughly 130 kB, So there should be 254 kB still available, and the question is how much the RTOS is using.
Anybody some more information on this? Thanks.
It's all ok: I found a nice figure in the FX3 programmers manual (p. 54) that explains everything.
Besides the memory map on page 51 of EZ-USB FX3 Technical Reference Manual., Spec No.: 001-76074 Rev. *B, there is a sentence: "The memory map for the firmware application is specified through a linker script file." Which file is referenced here? Can I modify the memory map to maximize the DMA buffer area?
sure, you can do this.
You can modify the size of the code- and data-sections by changing the linkerscript-file which is a file with the suffix .ld . In the Cypress SDK you can find this files usually in the installation-path at \firmware\common\ or something similar. In your linker-settings there should be usually a reference to such a linker-script - file.
The size of the heap and the DMA-buffer section is defined in the file cyfxtx.c in your project. There are defines like:
CY_U3P_MEM_HEAP_BASE = base-address of the heap
CY_U3P_MEM_HEAP_SIZE = size of the heap
which you can change.
The remaining memory is the DMA-buffer section:
CY_U3P_BUFFER_HEAP_BASE = CY_U3P_MEM_HEAP_BASE + CY_U3P_MEM_HEAP_SIZE
CY_U3P_BUFFER_HEAP_SIZE = CY_U3P_SYS_MEM_TOP - CY_U3P_BUFFER_HEAP_BASE
The actual linker file is present in the location:
For FX3 parts that have only 256 KB of RAM (cyusb3011, cyusb3012), the linker file is:
- Madhu Sudhan