pioasm and gnu assembler #1160
Labels
No labels
bazel
bluetooth
board settings
boot_stage2
bug
build
c++
can't reproduce
clang
clib-interface
cmsis
code cleanliness
code size
compiler version issues
cyw43_driver
debug
discussion
documentation
duplicate
dynamic_clock
elf2uf2
enhancement
errata
filesystem
flash layout
floating point
FreeRTOS
hardware_adc
hardware_claim
hardware_clocks
hardware_dma
hardware_exception
hardware_flash
hardware_gpio
hardware_i2c
hardware_irq
hardware_pio
hardware_pwm
hardware_rcp
hardware_rtc
hardware_spi
hardware_sync
hardware_uart
hardware_vreg
hardware_watchdog
hardware_xosc
help wanted
host
IAR
installation
invalid
linker scripts
lto
lwip
mbedtls
missing API
needs reporter detail
networking
newlib
newlib-multicore
non-c
non-cmake
non-gcc
openocd
orphan PR
OS integration
pico_async_context
pico_base
pico_binary_info
pico_flash
picolibc
pico_lwip
pico_malloc
pico_multicore
pico_printf
pico_runtime
pico_stdio
pico_stdio_usb
pico_sync
pico_time
pico_util
pioasm
port
question
review
review2
rtos interop
runtime init
static library
svd
test
tinyusb
vscode
wifi integration
wontfix
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-raspberrypi/pico-sdk#1160
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
HI
An option would be fine to generate an assembler compatible .h file
or a #ifdef to exlude the C specific lines. (to keeping the public #defines only)
Some of the header files do already do that, e.g.
https://github.com/raspberrypi/pico-sdk/blob/develop/src/common/pico_base/include/pico/config.h#L11
https://github.com/raspberrypi/pico-sdk/blob/develop/src/boards/include/boards/pico.h#L8
Which
.hfiles do you want to use in assembler, that you're not able to do at the moment?The picoasm generated .h file. Currently I defined some pins in the *.pio asm because can't "include" mine "hwpins.h", I don't want to define twice the pins (what can lead some trouble if I forget something :D ) so the pin what are defined in the *.pio asm I using in the C code and also want use in the asm file. currently the assembler don't like the "program" definitios. the other stuff can be excluded by #define PICO_NO_HARDWARE, mine current solution is wrote a C file what defines some static structures with the defs/labels in the generated pio.h file. then those structures referenced in the asm code.
sample.c.gz
Given the original author intend:
Using "pico_generate_pio_header_pre" as I've implemented here:
https://github.com/visenri/pico_cmake_extras
allows the use of all c preprocessor features.
So it can be used to include other files or use preprocessor macros defined elsewhere.
Not exactly the request of this topic, but it is an alternative that IMO offers a better way to do exactly what the author intended.
@kilograham:
This should be easy to integrate into the next SDK release.
@will-v-pi I had missed the linked new CMake function; can't make it in 2.2.0 but lets add it to the next release