Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Bug when using more than 64k Flash on ATMega 1284P
Goto page Previous  1, 2
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
njepsen

Bascom Member



Joined: 13 Aug 2007
Posts: 414

newzealand.gif
PostPosted: Tue Aug 06, 2013 5:40 am    Post subject: Reply with quote

Hi Mark,
I'm sorry i misunderstood that you were certain of the cause. I have not got back to you because I had made a couple of line changes to the code and the problem went away for a few days, but another line change and its now back again, in a different place. It is hard to repeat consistently. I downloaded the beta at home, and will copy it to an Sd and bring it to work to try next week.
regards

_________________
Neil
Back to top
View user's profile
njepsen

Bascom Member



Joined: 13 Aug 2007
Posts: 414

newzealand.gif
PostPosted: Thu Aug 08, 2013 7:55 am    Post subject: Reply with quote

Mark I am now running the beta but the help file is no longer accessible from within the editor. When i click on help or ?, nothing happens. How do i get it back?
_________________
Neil
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5228
Location: Holland

blank.gif
PostPosted: Thu Aug 08, 2013 9:47 am    Post subject: Reply with quote

Questions about the beta should be directed to support. This is really off topic.
But to answer the Q (this time) : you need to change the access rights of the chm file.
Try what happens if you launch it from explorer.
Otherwise check the settings that you indeed selected chm and not hlp

_________________
Mark
Back to top
View user's profile Visit poster's website
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5228
Location: Holland

blank.gif
PostPosted: Thu Aug 08, 2013 10:34 am    Post subject: Reply with quote

For the record : The beta did not come with a new chm only a new pdf. So i guess you forgot to copy the bascavr.chm file when you made a new test folder.
_________________
Mark
Back to top
View user's profile Visit poster's website
jene

Bascom Member



Joined: 03 Aug 2008
Posts: 13

germany.gif
PostPosted: Sun Sep 21, 2014 10:54 am    Post subject: Reply with quote

albertsm wrote:
that was already solved. i gave access to the beta but did not heard back?. that problem was very simple. the code contained an lpm where it should call a special lpm routine which increases rampz at a page boundary.
for some reason search on my project did not find all lpm code when i changed it many years ago.
but like i wrote before , this is different. it is likely the rampz gets a wrong value at some stage but i do not like guessing. i like some code to look at.


Hi Mark,

I actually come back with this problem. After reorganizing my programm I never exceed the 50% Flashrange of my XMega128A4-AU.
But right now I am getting over the 50% Flash usage. My LCD will show bad graphics if I step over this limit.
If I remove some code, a included picture or an font file (doesn´t matter WHAT will be removed) and the 50% will not exceed,
everything works fine again. I really have no idea any more. As the Project is very big and contains some sensible data, I would
like to send it to you instead pf posting. Will it be ok?

BR,
Jens
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5228
Location: Holland

blank.gif
PostPosted: Mon Sep 22, 2014 3:49 pm    Post subject: Reply with quote

you can best write to support. but i do expect you have tested with the latest version. include app files (zipped) and mention version and serial.
the Xmega is special since it uses rampz for both elpm and memory access. this means that rampz need to be set to the proper value for normal ram access too.
So this is some other problem.

_________________
Mark
Back to top
View user's profile Visit poster's website
jene

Bascom Member



Joined: 03 Aug 2008
Posts: 13

germany.gif
PostPosted: Fri Oct 03, 2014 11:12 am    Post subject: Reply with quote

Dear all,

Mark spend a couple of time to find the problem. It was inside my code.
I use the graphics fonts from Evert Dekker in the updated version from Mladen (runs 15-20% faster).
This version uses loadlabel to load the used Fonts. The variable is declared as a word which does not
contain the page adress. This is the point where the graphics on the lcd gets distorted.

I will ask Evert / Mladen if they can fix this problem in their code.

BR,
Jens


EDIT: Mark awakened my ambition and with his tipps I changed the code from Evert / Mladen.
You need to change the following line:

Code:

Dim Font_adress As Word
 


to

Code:

Dim Font_adress As Dword , Font_addressp As Byte At Font_adress + 2 Overlay
 


If you switch the Fontsets
Code:

Font_adress = Loadlabel(font6x8)
 


just change the line to

Code:

Font_adress = Loadlabel(font6x8) : Font_addressp = Rampz
 


afterwards you need to change all variables which calculate with the variable Font_adress from WORD to DWORD.

After I changed everything the lcd will distorted again (more than before).
Than I found in the Help of Bascom the following line:

"Cpeek() is limited to the first 64 KB of the code memory. For processors that have larger flash code memory like the Mega128 (128KB) you can use CpeekH()."

Ok, after that I changed all CPEEK to CPEEKH and finally it works now perfectly!

Thanks again to Mark for the great support within the last 2 days!

BR,
Jens
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum