embassy-rs / stm32-data

66 stars 94 forks source link

Suspicious Memory layout for STM32G4 #479

Closed AdinAck closed 2 months ago

AdinAck commented 2 months ago

As outlined in #478 , the SRAM size for these chips looks wrong. But I am not sure how to correct it.

image
Dirbaio commented 2 months ago

If the ram is aliased, just put it twice. Something like this should work:

CCM_SRAM_ICODE 0x10000000 10, SRAM1 0x20000000 16, SRAM2 0x20004000 6, CCM_SRAM_DCODE 0x20005800 10

The memory.x generator will use the largest contiguous block, in this case 32kb stating at 0x20000000.

AdinAck commented 2 months ago

Gotcha, on it.

AdinAck commented 2 months ago

I have amended and reopened #478 . I don't have the other variants of the G4 so I can't test the new memory layouts and as such I did not fix those.

AdinAck commented 2 months ago
image

Surely this is a typo in the G441xB datasheet 🤣

Dirbaio commented 2 months ago

fixed in #478