VSOS 3.42 Linking Challenges

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
Passionate Jaguar
Senior User
Posts: 69
Joined: Sun 2014-05-04 9:17

VSOS 3.42 Linking Challenges

Post by Passionate Jaguar » Wed 2017-05-24 8:06

Gentlemen,

As with our last OS 3.27, we needed to add thisTask() symbol to the kernel symbols in transient_x by increasing the transient_x: length to 0x022c. Now a new linking error appeared:

Code: Select all

ERROR: vslink: section CreateTaskAndStack not mapped to transient_i
So I changed transient_i: length = 0x0b75 and everything linked and loaded properly.

Both transient_i and transient_x both start at 0x7000 so obviously they interact. Having not witnessed this second linking problem with 3.27, I would like to understand what exactly is going on. How is CreateTaskAndStack() connected to the USB mass storage allocation in the file "mem_desc_kernel03.mem"?

And do these modified lengths end on the right byte without causing any other problems when I get my app loaded and running?

Is there any chance thisTask() can get added to the kernel?

I love the faster boot from external SPI Flash. Looking forward to putting the new debug tools in 3.3x and drivers assembled in 3.42 as now I undertake rewriting into more .dl3's so all of the functions in our application actually fit within a single application! Very eager to try out the last years worth of your code optimizations!

Thanks for all the efforts to make this VS1005g chip really come together!
Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.43 - VSIDE v2.42

User avatar
Panu
VLSI Staff
Posts: 2418
Joined: Tue 2010-06-22 13:43

Re: VSOS 3.42 Linking Challenges

Post by Panu » Wed 2017-05-24 9:07

Hi!

A good point regarding thisTask! I'll immediately add it into the kernel symbols.

That said, there's several points and several ways to fix the problem..

1) VSDSP is a Harward architecture, e.g. the memory spaces (I, X and Y) are separate. Really separate: there are three separate address and data buses between the CPU and the memories. So they don't interact even if they have the same address.

2) You can add thisTask symbol in any library or program, it doesn't need to be in the kernel. Although we will add it asap, of course.

3) Instead of adding thisTask to the external symbols, you could add it in your program directly as an absolute symbol. In the VS1005g, it's in the beginning of XRAM, at address 18, so you could declare it as: LINK_ABS(thisTask,18) . You can see if it works. It's not the most portable solution, though.

4) I updated the kernel into version 3.43 and added thisTask to the symbols. Could you please see if it works. It's in the kernel thread.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Passionate Jaguar
Senior User
Posts: 69
Joined: Sun 2014-05-04 9:17

Re: VSOS 3.42 Linking Challenges

Post by Passionate Jaguar » Wed 2017-05-24 9:57

Hi, Panu,

I put it into the kernel.h for portability as did you now. I will test the new kernel right away and post here the results. Thanks for the quick response on this.

Amazing speed. I got our 3.27 now up to 3.42. The entire application is running so much faster. This will make library swapping much more transparent to the user.

Will the internal flash run this fast? What is its max internal flash speed compared to the new 3.42 external flash default speed?

Thanks,
Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.43 - VSIDE v2.42

Passionate Jaguar
Senior User
Posts: 69
Joined: Sun 2014-05-04 9:17

Re: VSOS 3.42 Linking Challenges

Post by Passionate Jaguar » Wed 2017-05-24 10:30

Hi Panu,

Just tested 3.43 and kernel compiled correctly. Recompiled ap3 and loaded both to external SPI Flash. Everything worked great without linking problems. Should I reinstall VSIDE with original files just to be sure? I did <previously> modify the file ../libvs1005g_vsos3/kernel.h to include DLLIMPORT(thisTask)?

Thanks,
Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.43 - VSIDE v2.42

User avatar
Panu
VLSI Staff
Posts: 2418
Joined: Tue 2010-06-22 13:43

Re: VSOS 3.42 Linking Challenges

Post by Panu » Wed 2017-05-24 10:58

Hi!

Great that it works! I couldn't update kernel.h because libs are distributed with the VSIDE, so I think you should keep the kernel.h that you are using... better yet, you could reply and attach your kernel.h, I'll add it to the message in the kernel release thread.

Thank you!

-Panu

PS. Internal flash runs at even higher speed; looking at vsos_vs1005g.h, we've set the bus speed of external SPI flash to 6 Mbps and the internal flash to 24 Mbps. Even the 6M is a conservative value that should support any SPI flash with any PCB, you can set it higher in vsos_vs1005g.h and see how fast you can set it without problems (whereas we know the properties of the internal flash and the connecting bus is only a few millimeters long). But be warned, there's very little protection against corrupted binaries in the loader, so leave a reasonable safety margin in your finished product!
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Passionate Jaguar
Senior User
Posts: 69
Joined: Sun 2014-05-04 9:17

Re: VSOS 3.42 Linking Challenges

Post by Passionate Jaguar » Wed 2017-05-24 11:04

Hi Panu,

File kernel.h attached from VSIDE 2.42.

Thanks,
Scott
Attachments
kernel.h
From VSIDE 2.42
(991 Bytes) Downloaded 14 times
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.43 - VSIDE v2.42

Post Reply

Who is online

Users browsing this forum: No registered users