Intel® SoC FPGA Embedded Development Suite
Support for SoC FPGA Software Development, SoC FPGA HPS Architecture, HPS SoC Boot and Configuration, Operating Systems

Verify BSP settings

MV
New Contributor I
827 Views

I am developing a system using Cyclone V under Linux OS.
Up to now I was focused on rebuilding of the kernel and device tree. The device tree that is loaded contains the HPS peripherals I am looking for with status = "okay"; but the devices do not seem to work. Also cat /proc/interrupts doesn't seem to be showing interrupts associated with some of the peripherals. Would that likely be an issue with my device tree or could that be that the HW is not enabled in my BSP (that I didn't touch since I started with the GHRD). In case of the UART (serial1) I clearly have a Linux driver running on serial0 so I should be covered there.

I realize that the BSP code embedded into the u-boot is responsible for bring-up of the HPS resources that will be used by the kernel drivers.

  • Is there a way to verify that the resource (such as "serial1") is actually enabled from within a running OS?
  • Can one enable a HPS module during run-time or is the bootloader the only place?

Thanks - Martin

0 Kudos
1 Solution
MV
New Contributor I
809 Views

Got that one resolved!
I decided to re-build bootloader and tried to follow the GSRD v14.0 - Generating and Compiling the Preloader
When I copied the binary to my uSD card the system didn't boot - likely some of the important details like partition type etc. I went back to my previous scripts that use mainline u-boot (branch v2019.07). 
After some searching how the BSP specific information gets included into the u-boot-with-spl_DE0.sfp u-boot binary I discovered in the u-boot build tree the file

board/terasic/de0-nano-soc/qts/pinmux_config.h

 I edited desired "...USEFPGA" values to "1"

    abbreviated ...
1, /* UART1USEFPGA */ 0, /* CAN1USEFPGA */ 0, /* USB1USEFPGA */ 0, /* I2C3USEFPGA */ 1, /* I2C2USEFPGA */
...

rebuilt the u-boot, placed on my uSD card and the previously failing kernel with corresponding drivers and device tree started to work as expected.
Hoping this may help someone else.
Martin 

View solution in original post

0 Kudos
5 Replies
MV
New Contributor I
810 Views

Got that one resolved!
I decided to re-build bootloader and tried to follow the GSRD v14.0 - Generating and Compiling the Preloader
When I copied the binary to my uSD card the system didn't boot - likely some of the important details like partition type etc. I went back to my previous scripts that use mainline u-boot (branch v2019.07). 
After some searching how the BSP specific information gets included into the u-boot-with-spl_DE0.sfp u-boot binary I discovered in the u-boot build tree the file

board/terasic/de0-nano-soc/qts/pinmux_config.h

 I edited desired "...USEFPGA" values to "1"

    abbreviated ...
1, /* UART1USEFPGA */ 0, /* CAN1USEFPGA */ 0, /* USB1USEFPGA */ 0, /* I2C3USEFPGA */ 1, /* I2C2USEFPGA */
...

rebuilt the u-boot, placed on my uSD card and the previously failing kernel with corresponding drivers and device tree started to work as expected.
Hoping this may help someone else.
Martin 

0 Kudos
JingyangTeh
Employee
784 Views

Hi Martin


Glad that you able to get the uboot to boot from SD Card.

There is a much easire method of doing it available here in the link below:

https://www.rocketboards.org/foswiki/Documentation/BuildingBootloaderCycloneVAndArria10#Cyclone_V_SoC_45_Boot_from_SD_Card


Regarding the question that you have. Please find my respond below:


Is there a way to verify that the resource (such as "serial1") is actually enabled from within a running OS?

Once booted you could check the device under the "/dev" directory in the Linux OS.


Can one enable a HPS module during run-time or is the bootloader the only place?

The HPS module needs to be enabled during the bootloader.




0 Kudos
JingyangTeh
Employee
763 Views

Hi


Do you have any question regarding this topic?


Regards

Jingyang, Teh


0 Kudos
JingyangTeh
Employee
752 Views

Hi 


Sorry to inform you that, I am taking annual leave next week.

Please expect some delay in my reply.


Thank you very much in advance!


Regards

Jingyang, Teh


0 Kudos
EBERLAZARE_I_Intel
739 Views

Hi,


I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.



p/s: If any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4/5 survey. You may also select your own Best Answer.


0 Kudos
Reply