fixup error when using AUTOBANK=1 option

HiTech had a great compiler for PSoC's M8C processor, but, then they were bought by Microchip. Subsequently the HiTech forums were taken off line. At the request of PSoCDeveloper members PSoCDeveloper has created this forum to allow HiTech users to support each other.

Moderator: ericb

fixup error when using AUTOBANK=1 option

Postby veneff » Thu Sep 26, 2013 11:34 am

I have inherited this project and there seems to have been a compiler update between the last time the PSoC project was successfully compiled and now. When it was last successfully compiled, the version # of the Hi-Tech compile was 9.61 as reported in the listing. It is now reported as 9.61LP4
The project had the compiler option --AUTOBANK=1 which now causes a series of
(1268) fixup overflow storing 0x1XX in 1 byte at 0xXXX
errors.
I assume that this has something to do with the version change, but don't know.
All I know if I compile without --AUTOBANK=1, the firmware does not work the same
as the original.
This with PSoC Designer 5.0 SP2 Build 471.

Thanks for any insight!
Vance
veneff
Newbie
Newbie
 
Posts: 3
Joined: Thu Sep 26, 2013 11:22 am

Re: fixup error when using AUTOBANK=1 option

Postby bobmarlowe » Thu Sep 26, 2013 1:37 pm

Cypress changed compiler from Hi-Tech to ImageCraft and the actual version of Designer is now 5.4.
I suggest you to file a technical case at Cypress.com to get help from an engineer.


Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: fixup error when using AUTOBANK=1 option

Postby veneff » Fri Sep 27, 2013 4:29 am

Thanks Bob for the response.

I already went down that path. They were not able to help me; because, as you say, the Hi-Tech compiler is no longer supported.
I am hesitant to update Designer and migrate to the new compiler because I am unfamiliar with this code and it is already apparent that it is sensitive to changes in environment.

Here is more specific information concerning this fixup overflow error:
In this attempt I changed the compiler option to --AUTOBANK=2
The map file shows the linker option -pbss2=0200h
which is what would expect.
A line with the fixup error from the listing is:
0010' 5F 00' 00' mov [(?_crc_generate+1)^(0+512)], [_dataIndex^(0+512)]
_dataIndex is listed in the bss2 section, so _dataIndex^(0+512) would resolve to a single byte result
?_crc_generate is a compiler generated symbol and I believe that it is being assigned a ram page 0 address.
These symbols are normally assigned to the fnauto section which is attached to bss0.
So the expression (?_crc_generate+1)^(0+512) is resolving to a 2 byte value, 02xxh;
The question is now: why is the compiler generating code as if the fnauto symbols are in ram page 2?

Vance
veneff
Newbie
Newbie
 
Posts: 3
Joined: Thu Sep 26, 2013 11:22 am

Re: fixup error when using AUTOBANK=1 option

Postby bobmarlowe » Fri Sep 27, 2013 5:54 am

Is there any chance of posting the complete project here openly? I do not know what the AUTOBANK options do exactly, but afaIk Dana has got a HiTech compiler and may try to compile your project while I could try to adapt it to the ImageCraft version.

Bob
User avatar
bobmarlowe
The Big Cheese
The Big Cheese
 
Posts: 1490
Joined: Thu Oct 06, 2011 2:03 am
Location: Germany

Re: fixup error when using AUTOBANK=1 option

Postby danadak » Mon Sep 30, 2013 4:15 pm

If you go to this page, do a "Ctrl + F". search on "Fixup", you might find help -

http://www.htsoft.com/support/faqs.php

Also google "Fixup Error Hitech" you will get a myriad of hits with past problems and some solutions.

I am still using Hitech and Designer 5.4, and over Imagcraft code reduction is ~ 40%.

Regards, Dana.
Field Application Engineer
KB1RHB Mostly listen :)
Semi Retired
User avatar
danadak
The Big Cheese
The Big Cheese
 
Posts: 2008
Joined: Thu Dec 27, 2007 8:42 am
Location: New Hampshire

Re: fixup error when using AUTOBANK=1 option

Postby veneff » Wed Oct 02, 2013 5:03 am

Thank you for your thoughts on my issue!
I just wanted to let you know how the issue had turned out:

The problem turns out to be that PSoC Designer 5.0 SP2 was setting psect fnauto to RAM page 0, not to page 2, when --AUTOBANK=2 option was used. A mov direct to direct instruction has to reference the same RAM page. Can't mov from a variable in RAM page 2 to a variable in RAM page 0. I presume this was fixed in a later service pack.

I did byte the bullet and downloaded PSoC Designer 5.4 with the ImageCraft compiler; but ran into a problem with it saying the bootloader would not fit:
It says that:
!E <library>(3087): {linker} area 'Bootloader' not large enough. Need 1560 bytes
lo 692 hi 2239 size 1548

According to the PSoC configuration, the bootloader starts at block 0x2 and is 0x21 blocks long.
My calculations show that gives 2112 bytes of space.

Could not figure how to resolve this problem so I decided to try the HiTech compiler with this PD 5.4 version. --AUTOBANK=x does now work. PSoC Designer 5.4 sets fnauto to the correct RAM page.

Thanks again!
Vance
veneff
Newbie
Newbie
 
Posts: 3
Joined: Thu Sep 26, 2013 11:22 am


Return to “%s” HiTech C User-to-User Support

Who is online

Users browsing this forum: No registered users and 1 guest