Netx / ThreadX / Compiler issue - BUG?
Hello,
I started a blank project for the STM32H743 with AzRtos, ThreadX, NetXDuo.. There is something weird with the compiler and linker, or I don't understand how to setup the project...
The project compiles and runs, but the memory mapping seems to be all over the place, and I can't figure out why.
There are 2 RAM sections that I want to use... RAM_D1 (axi-ram) and RAM_D2 (SRAM1). These are the current locations/size:

So, I want all the data, stack, variables to go into RAM_D1 (@2400_0000) and only the ethernet Descriptors and DataPool in (@3000_0000).
In the ethernet configuration, I setup the memory addresses as follows:

Note: it seems the RxBuffers Address is not used anywhere (correct me if I'm wrong, but I searched everywhere in the code and could not find it being used). Anyway, the Ethernet descriptors were put at 0x3000_0000, and 0x3000_0060.
Under AzureTROS settings, I allocated 40k to the NetXDuo memory pool

In the Flash.Id file I made these entries:
.eth_sec 0x30000000 (NOLOAD) :
{
/* 4 x 96 ETH */
. = ABSOLUTE(0x30000000);
*(.RxDescripSection)
/* 4 x 96 ETH */
. = ABSOLUTE(0x30000060);
*(.TxDescripSection)
} >RAM_D2 AT >FLASH
.nx_data 0x30000100 (NOLOAD):
{
. = ABSOLUTE(0x30010000);
*(.NetXPoolSection)
} >RAM_D2 AT >FLASH
Now, I thought it compiled correctly - the way I wanted, because when I checked the detailed memory map,
.eth_sec and .nx_data were at the correct locations and have the correct size:

The project compiles and runs, but it gets a glitch sometimes (ie ping stops responding, and then it starts again).
Then I noticed some weird things with AzRtos, it is putting the stack in RAM_D2 instead of where I expected (RAM_D1). Any I have no idea how to fix this....
When debugging, I displayed the ThreadX list, and the 2 NetxDuo thread stacks are located at 0x3000_xxxx

This makes absolutely no sense to me, and can anyone explain what I did wrong?
Thanks
Matthew
