Modifying DE10-nano default FPGA configuration - intel-fpga

I am working with Linux software on DE10-nano board and I need to perform a small modification to default FPGA configuration (add pull-ups on GPIO lines).
The user manual points to DE10-Nano System CD\Demonstrations\FPGA\Default as default project which suppose to produce the factory FPGA configuration.
I compile it, convert SOF to RBF, and put the RBF on SD card for U-Boot to load.
U-Boot programs FPGA (I get orange LED on) and then fails to load Linux device tree (I get ERROR: Did not find a cmdline Flattened Device Tree message via COM port) although the same device tree file is in the same place on SD card.
Am I using the correct Quartus project?

The only solution that worked for me (loading my own .rbf file with the unmodified Linux Angrstrom from Terasic) was to use the SD card images from:
http://download.terasic.com/downloads/cd-rom/de10-nano/linux_BSP/
I used the de10_nano_linux_console image. I used the sof_to_rbf.bat file to generate the .rbf file, ensuring that compression was turned on and the output file name was soc_system.rbf.
Any other method I tried with the SD card resulted in the error message the OP posted relating to the Device Tree.

Related

STM32 F407VG Boot into different (main-)applications

For a project I just started working on, I need to write a firmware in C that lets me boot into two different firmware versions. The task is to be able to update a device which includes an STM in the field using the RS485 Port with an Intel .hex file. My idea was to place the two firmware versions at designated starting addresses in the flash, including some kind of checksum for data integrity. According to the flash module organization found in the reference manual, my first thought was to place one version into sector 10 (starting at 0x080C0000) and the other version into sector 11 (starting at 0x080E0000). After every reset, the STM32 should boot into a "bootmanager" which is just minimum code that decides, whether the firmware in sector 10 or sector 11 is the newer version. I want to clarify my idea in the following graphic:
[Rough process][1]
[1]: https://i.stack.imgur.com/xLowh.png
The 128kBytes of every sector are sufficient. So far, I was able to write Single Bytes into the Flash and read them afterwards. Also, I have already set up a working UART communication using the RS485.
My questions
Can I just write the .hex file into the Flash as it is without modification like
:020000040800F2
:1000000002200B
etc?
As I am unexperienced with with jumps: How should I perform the jump from the "bootmanager" into sector 5 firmware? Are the adresses automatically relative to the entry point in sector 5?
Can you give me keywords or tell me, what challenges I will encounter?
*EDIT: I'm aware that the STM itself contains a bootloader. Unluckily, the RS485 device is hardwired to the GPIO pins used by USART2. According to the reference manual, the internal bootloader can only be used by USART1 and USART3, CAN2 and USB OTG FS
Can I just write the .hex file into the Flash as it is without
modification like
no you cant. You need to modify the linker script to archive it
You need to have the whole both applications in the FLASH so divide it 50/50%.
I usually add some serial FLASH to have a copy of the firmware if both of the images are damaged.
Yuo need to write the custom bootloader.
Most of the STM32 microcontrollers have support for dual memory bank and on the fly update (cf AN4767 - On-the-fly firmware update for dual bank STM32 microcontrollers)
This will allow to perform exactly what you require.
Usually the microcontroller will need to have a bootloader and 2 banks for the image.
When booting the bootloader will start and check which version it would have to boot and set the start address accordinngly.
This application note is for the F7 series but you can check it to see how it could work for your specific microcontroller (cf AN4826 - STM32F7 Series Flash memory dual bank mode).
Regarding your questions:
The code would be written as usual but twice (or 2 different firmwares)
Look into the application notes referenced and keywords such as: dual bank, on-the-fly update, DFU, etc

parallella fpga : how to give an interrupt from pl to arm ps

I successfully implemented an "[accelerator in 15 minutes]"1 on parallella board. Now I need to send an interrupt from pl to ps. So I connected it to IRQ_F2P of Zynq processing system.
Now, how can I get this interrupt in arm processor?
Usual interrupt example using "XILINX SDK" tool which uses a JTAG. But in parallella , I don't have a JTAG. (I am coping the program to SD card and execute it from SD card using Ubuntu). So any suggestions are most welcome.
So for parallella, I tried to use the Xilinx SDK, but the header files are creating an error..
My one more doubt is "Is it possible to create a bsp using sdk tool and copy it into sd card and then make it run on parallella board. Will it work ?
If not, how do we get this interrupt in arm processor, because all example uses Xilinx header files like "xparameters.h, xil_printf.h, xcugic.h, etc" and these are connected to many other Xilinx functions.

How to add LAN and RS232 in yocto

I have generated an Image(fsl-imx-x11 distro) from yocto but it doesn't contains LAN and RS232 terminal.
I would like to know where I can find its packages?
Is it also added same as recipe creation?
do I also need to change dtsi file?
I think what you might actually need to do is Pin Muxing on the the Board whereby, you need to add appropriate muxing of pins to activate the LAN and RS232 on the board.
For this you need to look into the board's Device Tree.
Refer to the Board's Documentation for Pin Muxing or Device Tree sections.
Find the respective .dtsi file in your $BUILD_DIR/tmp/work/<board-bsp>/arch/arm/boot/dts/
within the file you might need to enable pins under the &iomuxc{} structure.
at the bottom of the file you need enable the status flag to okay.
&eth{
pin-ctrl="..',
status = "okay"
};
You need to recompile the kernel:
bitbake -f -c compile; bitbake your kernel
or create a new image
Note
there is a sophisticated way of doing this by appending your Device Tree files in recipe and using devtool but for that you need to look into the Mega Manual

USB driver for STM32l100rc using HAL library

Is there anyone who has worked on STM32L1 series. I'm working on STM32L1xx series and wanted to write USB driver for it. Is there any example for USB driver for STM32L series or anyone worked on STM32L1xx series? Any help will be appreciated.
Thanks in advance.
You need these works to do:
1.USB client driver on STM32. There are lots of available codes in github or other website;
2.SDcard driver. Normally SDCard has two modes, include SPI mode and SD mode, the operation will be simplified a lot in SPI mode, however, in SD mode the speed will more faster than SPI mode. you can refer to datasheet for more information.
Download STM32CubeMX
Download STM32CubeL1
Start new project for your device, choose peripheral, choose device class for MSC
Setup clock for USB
Export project
Configure SPI for your SDCARD (SDIO is not available) for interface between USB device stack and SDCARD sector read on PC demand.
This are key steps to do, as I don't know what you know so far (looks like nothing) and what you have learn yourself so far (looks like nothing) I'm unable to give you comprehensive answer.

ALSA: How can I find a device in the device list and still I get "No such file or directory" when opening it?

It seems I don't understand the ALSA architecture, even after reading most of the documentation on offer:
I list all the available ALSA devices using snd_device_name_hint() and snd_device_name_get_hint(). This lists, among others "pulse" under hwdep class so it looks like PulseAudio is available in my system. But when I try to open it with snd_pcm_open() (non-blocking mode and either in or out) I get "No such file or directory".
What gives? I can open other devices, for instance the in-built Intel chip works fine, why doesn't PulseAudio?
Is pulseaudio running with the alsa emulation plugin loaded before you try to open the pulse device? If I understand how asoundrc files work you can create virtual alsa devices from the config file (which is how a pulse device gets created) which will exist whether the backend for that virtual device is running or not.

Resources