What is Nostr?
Andrew Zonenberg /
npub1wpg…f386
2024-07-03 02:51:10
in reply to nevent1q…kemx

Andrew Zonenberg on Nostr: This is how I do all of my embedded stuff, how else would you put them at predictable ...

This is how I do all of my embedded stuff, how else would you put them at predictable locations?

For example on the PicoRV32 platform I'm playing with now I have...

volatile APB_GPIO GPIOA __attribute__((section(".gpioa")));
volatile APB_Timer TIM1 __attribute__((section(".tim1")));
volatile APB_UART UART1 __attribute__((section(".uart1")));

and then in the linker script

.sfr (NOLOAD):
{
. = ALIGN(1024);
KEEP(*(.gpioa))
. = ALIGN(1024);
KEEP(*(.tim1))
. = ALIGN(1024);
KEEP(*(.uart1))
. = ALIGN(1024);
KEEP(*(.spi1))
. = ALIGN(1024);
KEEP(*(.count1))
. = ALIGN(1024);
KEEP(*(.count2))
. = ALIGN(1024);
KEEP(*(.devinfo))
} > APB
Author Public Key
npub1wpgh8qdt8suzxy8f2luspksj4wpdfw53weq4v8dr7llqp3t72tds3rf386