RE: Cyclone 10 LP BSP

2023-11-28 Thread Kirspel, Kevin
Never mind, It's something to do with my debugger and stepping through code.  I 
can get the hello world message to spit out if I break after the printf 
statement.

Kevin Kirspel (he/his), R Manager Sr II, BS EE
IDEXX | One IDEXX Drive Westbrook, Maine 04092 | m. +1 770-688-1642 | idexx.com


We help pets lead fuller lives + + + + + + +


[Shape  Description automatically generated with medium confidence]

From: Kirspel, Kevin
Sent: Monday, November 27, 2023 7:19 PM
To: devel@rtems.org
Subject: Cyclone 10 LP BSP

I'm trying to create a BSP for a NIOS V/m running on a Cyclone 10 LP Eval Kit.  
The NIOS V/m is a rv32ia/ilp32 architecture so I had to patch the RSB to add 
that multilib.  I have a Hello World app compiled but I get exceptions when 
having the tick timer interrupt enabled.  So, I disabled the tick timer 
interrupt and was able to get to the Init() task.  When execution the hello 
world printf, I get another exception related to puts_r in newlib.  The 
exception is occurring when trying to load the address of _tls_stdout.  I 
traced this back to THREAD_LOCAL_STORAGE being enabled in newlib for the RISC 
V.  Does the BSP have to do anything to setup thread local storage or does this 
happen automatically when triggered?  The exception occurs after it returns 
from __sinit which I guess is initializes the thread local storage.

Kevin Kirspel (he/his), R Manager Sr II, BS EE
IDEXX | One IDEXX Drive Westbrook, Maine 04092 | m. +1 770-688-1642 | idexx.com


We help pets lead fuller lives + + + + + + +


[Shape  Description automatically generated with medium confidence]

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Cyclone 10 LP BSP

2023-11-28 Thread Sebastian Huber

On 28.11.23 01:19, Kirspel, Kevin wrote:
I’m trying to create a BSP for a NIOS V/m running on a Cyclone 10 LP 
Eval Kit.  The NIOS V/m is a rv32ia/ilp32 architecture so I had to patch 
the RSB to add that multilib.  I have a Hello World app compiled but I 
get exceptions when having the tick timer interrupt enabled.  So, I 
disabled the tick timer interrupt and was able to get to the Init() 
task.  When execution the hello world printf, I get another exception 
related to puts_r in newlib.  The exception is occurring when trying to 
load the address of _tls_stdout.  I traced this back to 
THREAD_LOCAL_STORAGE being enabled in newlib for the RISC V.  Does the 
BSP have to do anything to setup thread local storage or does this 
happen automatically when triggered?  The exception occurs after it 
returns from __sinit which I guess is initializes the thread local storage.


On RISC-V this should work out of the box. Do you have your own BSP? 
Maybe a memory setup / linker script issue.


--
embedded brains GmbH & Co. KG
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel