<zmatt>
mattb0ne: uhh, how is stuff declared on the PRU1 side? though actually, probably not regardless. it also depends on the linker script
Guest19 has quit [Quit: Client closed]
<zmatt>
in general having C code on both sides is a bit of a headache to ensure they don't think they can allocate the same shared memory
<zmatt>
assuming the StepperInterface is allocated at address 0 of pru1, to access it from pru0 I'd just use #define stepper (*(struct StepperInterface volatile *)0x2000))
<zmatt>
there are probably nicer ways but clpru is fiddly with that
<zmatt>
oh I did define something nice for it in the linker script I think
<zmatt>
that puts it in an uninitialized section I defined in the linker script specifically to access the private memory of the other core
<zmatt>
I still really hate I can't combine a cregister-attribute with a location-attribute
<zmatt>
so the only convenient way to make sure something with a cregister attribute is allocated at the desired address is to make it the only variable allocated in that section
<zmatt>
(thus causing it to be allocated at offset zero in it)
<zmatt>
it would be nice if py-uio had some checks to ensure that the programs loaded onto the two cores don't have conflicting memory allocation
<mattb0ne>
if we were on a different chip would there be much differnce between #define and far struct
<zmatt>
mattb0ne: these memory allocation / linker script details are specific to TI's toolchain, although you'd have similar issues whenever you'd have a similar multi-processor system with similar shared memory arrangement
<zmatt>
"far" in particular is not a standard C keyword
<zmatt>
casting an address to a pointer (like I do in the #define) is obviously a portable way to make a pointer to something you know is located at a specific address
<zmatt>
if you were using pasm then allocating and initializing memory would be entirely your responsibility
mattb0ne has quit [Ping timeout: 240 seconds]
jfsimon1981 has joined #beagle
jfsimon1981 has quit [Client Quit]
brook has joined #beagle
mattb0ne has joined #beagle
<mattb0ne>
what is the fastest way to write 500K lines to file
<mattb0ne>
my code runs really slow after 300K
<mattb0ne>
this is seperate from beagle just a generic c++ thing
brook has quit [Remote host closed the connection]
mattb0ne has quit [Ping timeout: 260 seconds]
Whisky` is now known as Lewd`n`Lasciviou
rob_w has quit [Remote host closed the connection]
Posterdati has quit [Ping timeout: 240 seconds]
mattb0ne has joined #beagle
mattb0ne has quit [Ping timeout: 240 seconds]
florian has quit [Quit: Ex-Chat]
mattb0ne has joined #beagle
brook has joined #beagle
brook has quit [Remote host closed the connection]
brook has joined #beagle
brook has quit [Remote host closed the connection]
denix_ is now known as denix
denix has quit []
denix has joined #beagle
mattb0ne has quit [Ping timeout: 258 seconds]
mattb0ne has joined #beagle
vagrantc has joined #beagle
mattb0ne has quit [Ping timeout: 252 seconds]
mattb0ne has joined #beagle
brook has joined #beagle
Posterdati has joined #beagle
ikarso has quit [Quit: Connection closed for inactivity]
starblue1 has joined #beagle
mattb0ne has quit [Ping timeout: 252 seconds]
brook has quit [Remote host closed the connection]
alan_o has quit [Remote host closed the connection]
ketas has quit [Read error: Connection reset by peer]
vitorio has quit [Read error: Connection reset by peer]
jkridner has quit [Read error: Connection reset by peer]
jkridner has joined #beagle
alan_o has joined #beagle
vitorio has joined #beagle
alan_o has quit [Remote host closed the connection]
ketas has joined #beagle
alan_o has joined #beagle
ikarso has joined #beagle
otisolsen70 has quit [Read error: Connection reset by peer]
brook has joined #beagle
brook has quit [Read error: Connection reset by peer]
starblue1 has quit [Ping timeout: 240 seconds]
ft has joined #beagle
Guest26 has joined #beagle
Guest26 has quit [Client Quit]
ikarso has quit [Quit: Connection closed for inactivity]
mattb0ne has joined #beagle
Lewd`n`Lasciviou has quit [Server closed connection]