RDS Radio compile problem with asm files

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: 74
Joined: Sun 2014-05-04 9:17

RDS Radio compile problem with asm files

Post by Passionate Jaguar » Sun 2018-07-22 11:26

Hello,

After upgrading our FM/RDS code from the original (test code) to the latest from 6-12-18 (which compiles correctly), I am having a compile problem in fm_function.c file. I have replaced the old RunIQComp/FmIQRound combination with RunIQComp.c/FmIntC.c/fmint.s combination.

I am getting the following in function RunIQComp:
ERROR 102: pointer type needed for parameter 1
at line

Code: Select all

WriteIMem(0x20+INTV_FM, ReadIMem((u_int16) (&FmIntVector)));
Exactly as in your fm_function.c source file, immediately before RunIQComp is the following:

Code: Select all

extern u_int16 FmIntVector;
u_int16 IqCompDisable = 0;
This is as documented in the fmint.s ASM file. I have checked your solution project properites and they are the same as our project properties, except the linker in your project uses

Code: Select all

mem_desc_app02.mem
where mine uses

Code: Select all

mem_desc_app03.mem
Could this be causing the problem? Any other ideas on what to look for? How can I tell if the ASM files are actually getting built and linked?

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

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

Re: RDS Radio compile problem with asm files

Post by Panu » Sun 2018-07-22 20:19

The mem_desc file has no relevance.

There may be a new prototype for WriteIMem added in some header file recently. Try changing your code to:

WriteIMem((void*)(0x20+INTV_FM), ReadIMem((u_int16) (&FmIntVector)));

-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: 74
Joined: Sun 2014-05-04 9:17

Re: RDS Radio compile problem with asm files

Post by Passionate Jaguar » Mon 2018-07-23 5:13

Hi Panu,

Thanks for the quick reply. Tried it and I got the same error message. I did not find any rogue references in my header files.

But a search for WriteIMem did turn up something interesting:
In imem.h [29] i find:

Code: Select all

void WriteIMem(register __i0 u_int16 addr, register __a u_int32 instr);
while in vs1005g.h [1870] there is:

Code: Select all

void WriteIMem(register __ i0 void *addr, register __reg_a u_int32 ins);
So I added

Code: Select all

#include vs1005g.h
in my fmfunction.c file, but a Build Solution got the same results.

The original FM Test code I have been using for quite a while used the same form you suggested in the old function RunIQComp(void):

Code: Select all

WriteIMem((void*) ox31, ReadIMem(int0x31));
In case it helps I have been using VSOS 3.55 since its release (with newest VSIDE) for both my latest test stand version as well as the one I am updating the RDS Radio code into. Meanwhile, I will more carefully check my header files compared to the new RDS Radio headers to see if something might be causing a conflict. Let me know if you have anything else you want me to test.

Hope this helps find the problem.
Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.55 - VSIDE v2.43

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

Re: RDS Radio compile problem with asm files

Post by Passionate Jaguar » Mon 2018-07-23 6:02

Hi Panu,

Just #if 0 the new code and #if 1 the original code which used the call

Code: Select all

WriteIMem((void*) 0x31, ReadIMem(int0x31));
and got very different results. Now fm_function.c compiles but in both fmint.s and mac0int.s the following link error occurs

Code: Select all

Couldn't open file vs1005h.h
I see these at the top of the listing but do not know what they are. My code uses "vs1005g.h". Can I copy the file from the RDS Radio file? It still has as the first line:

Code: Select all

#ifndef __VS1005G_H__
which may conflict with my existing vs1005g.h. Very confused here.

Because I loaded the new RunIQComp and FMIntC and compiled before I noticed there were associated ASM files needed, it seems the compiler got confused. Anyway, What is vs1005h.h and where can I find it? Seems it must be something new as a typo in both ASM files is most unlikely. Maybe when these ASM files compile and link, the other calls may start working. Either way, both problems need remedy, I think.

Please let me know if I am chasing rabbits here while the elephant yet sits in my office!
Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.55 - VSIDE v2.43

Hannu
Senior User
Posts: 40
Joined: Mon 2016-05-30 11:54

Re: RDS Radio compile problem with asm files

Post by Hannu » Mon 2018-07-23 7:06

Hi!

vs1005h.h header file is for the development version of vs1005. The chip version independent compilation didn't work in this project :(

As a totally untested workaround you could could copy it to your project directory from VSIDE_INSTALLATION/libvs1005h_vsos3/vs1005h.h or change the #include lines to vs1005g.h. I found it in spread over the project.

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

Re: RDS Radio compile problem with asm files

Post by Passionate Jaguar » Mon 2018-07-23 7:44

Hi Hannu,

Thanks for the idea. I copied the file to my Solution and compiled with both:

Code: Select all

#include <vs1005h.h>
and with

Code: Select all

#include "vs1005h.h"
and got the same results:

Code: Select all

ERRIR 102: pointer type needed for parameter 1
Old fm_function code works fine with vs1005h header file. That's the good news. Still digging.

Scott
VS1005 Demo Board v1.8, custom designed VS1005 boards, with VSOS 3.55 - VSIDE v2.43

Post Reply