8000 ports/stm32: Make ETH DMA buffer attributes configurable. by kwagyeman · Pull Request #16633 · micropython/micropython · GitHub < 8000 meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
[go: up one dir, main page]

Skip to content

Conversation

@kwagyeman
Copy link
Contributor

This commit allows the attributes for the eth_dma buffer to be overridden by a port.

OpenMV's firmware for the Arduino Portenta stores .data in the DTCM which is inaccessible by the ethernet controller. By overriding the buffer's attributes with alignment and section specifications, we can place the ethernet buffer in the right SRAM location.

@github-actions
Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO_W
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
  qemu rv32:    +0 +0.000% VIRT_RV32

@kwagyeman
Copy link
Contributor Author

@iabdalkader


#ifndef MICROPY_HW_ETH_DMA_ATTRIBUTE
#define MICROPY_HW_ETH_DMA_ATTRIBUTE __attribute__((aligned(16384)));
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would be better in mpconfigboard_common.h, near the bottom of that file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
@kwagyeman kwagyeman force-pushed the kwabena/configurable_dma_buffer branch from 6bd6729 to 84f883d Compare January 25, 2025 17:49
@dpgeorge
Copy link
Member
dpgeorge commented Feb 4, 2025

Rebased and merged in 112f657

@dpgeorge dpgeorge closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0