Page 7 of 12
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Fri Sep 08, 2023 4:47 pm
by pavel
It looks like a 256MB buffer can be allocated. I have just tried setting the buffer size to 256MB in the MCPHA application and it works.
I do not know how to measure the transfer rate to RAM.
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Thu Sep 28, 2023 1:17 pm
by fbalakirev
Thank you again Pavel.
I have another question related to OS image compatibility with 122-16 board - after I build your default SD card image e.g. 'led_blinker', it seems to boot fine in the 125-14 boards, but does not seems to boot in the 122-16 board. Should I build a different image targeting 122-16 PL, or is it some issue with my hardware?
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Wed Oct 04, 2023 10:07 pm
by pavel
I have just tested the script that builds the SD card image based on Debian Linux. The resulting image runs on the 122-16 board without any problems.
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Wed Oct 11, 2023 5:38 pm
by fbalakirev
Thank you for checking it. I think that the particular brand of SD cards that we use with 125-14 are not readable by the 122-16 unit for unclear reason. I found an alternative card and it works.
I'm running into some issues with gcc in the virtual machine (WSL Ubuntu 22.04 LTS) for some reason. It does compile and build RP notes OS image just fine, but when I tried making some examples in the 'red-pitaya-notes/projects/common_tools/app/' folder, I'm getting errors such as
Code: Select all
gcc -O3 -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard -o gpio-output gpio-output.c
gcc: error: unrecognized command-line option ‘-mfpu=neon’
gcc: error: unrecognized command-line option ‘-mfloat-abi=hard’
I wonder what I might have configured incorrectly.
P.S. I tried exporting export ARCH=arm and export CROSS_COMPILE=arm-linux-gnueabihf- but it still seems to invoke the wrong gcc compiler for intel architecture instead of arm one
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Wed Oct 11, 2023 8:15 pm
by pavel
I use make files from the project directories on the target platform. Either via qemu or directly on the Red Pitaya board.
If you want to cross compile you will need to replace gcc with arm-linux-gnueabihf-gcc.
These make files are very basic and do not use any environment variables.
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Thu Oct 12, 2023 9:30 am
by fbalakirev
Thank you for the clarification. Is there a basic guide around for setting up qemu for this particular task which you might suggest to follow by any chance?
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Thu Oct 12, 2023 10:42 am
by pavel
I normally compile all the C code from the alpine.sh and debian.sh scripts. So they are my examples on how to use qemu.
It could also be done from a container:
- create Containerfile containing the following lines
Code: Select all
FROM docker.io/arm32v7/debian:bookworm-slim
RUN apt-get update && apt-get install -yq build-essential
WORKDIR /src
- install podman and qemu-user-static
Code: Select all
sudo apt-get install podman qemu-user-static binfmt-support
- build container image
Code: Select all
podman build --arch arm --tag arm32v7 .
- run make using container image
Code: Select all
podman run --arch arm --rm --volume $PWD:/src arm32v7 make
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Wed Jan 03, 2024 6:01 pm
by fbalakirev
Hi Pavel,
I'm running into errors when I try to allocate and use CMA ram. I'm pretty much copied your code from adc_recorder_trigger.c example and the corresponding bit file script, but I'm getting errors such as "Alignment trap: not handling instruction ...", "Unhandled fault: alignment exception (0x811) at...", "Bus error", or occasional " cma: cma_alloc: reserved: alloc failed, req-size: 8192 pages, ret: -16"
Do you happen to have any suggestions what I could have done wrong?
Than You
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Wed Jan 03, 2024 8:11 pm
by pavel
No idea what could be causing these error messages.
I have just tested the adc_recorder_trigger application with the latest version of the SD card image based on Debian Linux (red-pitaya-debian-12.1-armhf-20231004.zip) and it works without any error messages.
Re: SD card image with Debian 8.0, Red Pitaya web server and SDK
Posted: Thu Jan 04, 2024 12:50 am
by fbalakirev
Thank you for testing it Pavel.
I tried to see what steps got me these errors. I noticed that after in the original adc_recorder\block_design.tcl I change CFG_DATA_WIDTH to 432 on line 64 and DIN_FROM 431 DIN_TO 400 in slice_3 on line 95, as well as width of all the cfg slices to 432, and then change line 49 in adc-recorder.c to *(uint32_t *)(cfg + 50) = size; I get these alignment and bus errors. I wonder what I'm doing wrong.