Hi, Do you have faced with this problem ? The USB debug adapter runs but the IDE debugger not. I can put breakpoint on the first line of the main but no break, no timer it generated too, when i stop running no stop on the code line executing. It seems there is a problem just before the main call.
thx
The USB debug adapter runs but the IDE debugger not. I can put breakpoint on the first line of the main but no break, no timer it generated too, when i stop running no stop on the code line executing. it would be helpful if you would tell us Which chip which USB adapter which IDE debugger
Erik
Hi, C8051F50XDK, Silicon Labs USB Debug Adpater, Keil A51, C51, BL51, Silicon Labs IDE.
Richard
THE END
What a relief!
It would be if it were true. But just wait ... He'll be back with his usual 'style'!
?C_START: MOV DPTR,#?C_INITSEG Loop: MOV 0CFH,#0H ; WATCHDOG CLR A
in this project, we must use standard startup files from compiler. (mandatory for our customer) then tell you customer "we can't" and show him the silabs knowledge base articles
the issue: www.silabs.com/.../McuKB.aspx
howto: www.silabs.com/.../McuKB.aspx
so, is THAT enough to get you to do what you need to do instead of trying to do something else that you 'prefer' but does does not work
in the preview I see both links are the same you need to type watchdog into the search window that comes up and find the two articles.
PS to the sardine: if you would takr the time to verify that I was wrong (which I am not) before you spewed your bile, there woould be a whole lot less of it
if you would takr the time to verify that I was wrong (which I am not) before you spewed your bile, there woould be a whole lot less of it
Where did I say you were wrong?
The poor chap is merely trying to explain why he's doing what he's doing (following the instructions in the documentation) yet you just keep yelling at him before finally flying into a sulk and saying you're not playing any more. Sadly your sulks don't seem to last very long.
Hi, Simply, is someone able to answer why with instructions above the watchdog never reset ? A piece of code which work with c8051F500 would be cool... or INIT.A51 file which work
Thx
A piece of code which work with c8051F500 would be cool...
howto: www.silabs.com/.../McuKB.aspx you need to type watchdog into the search window that comes up and find the article
INIT.A51 file which work what is an INIT.A51 file?
what is an INIT.A51 file?
You are joking, aren't you?
Perhaps not - it would explain some of your misplaced arrogance in this thread.
Time to read the C51 manual I think...
Hi, Thx Erik for your answer but we are searching the way to reset (refresh) the watchdog during startup and init sequence (before main call). During this sequence, writing to PCA0CPH5 doesn't work and so doesn't refresh the Watchdog ! It's a little bit strange, isn't it ?
what is an INIT.A51 file? You are joking, aren't you?
Yes, there is an init file build by the tools (the one between statup and main), but if that is 'user modifiable' I do not know of it. Since it is built by the tools how can it be .a51
During this sequence, writing to PCA0CPH5 doesn't work and so doesn't refresh the Watchdog ! It's a little bit strange, isn't it ? what sequence? the issue is NOT 'refreshing' but 'disabling'
for the f12x it looks like this, you find out how to do it for your chip (hint; it is in the documents I mentioned)
STARTUP1: ; disable watchdog mov SG_WDTCN,#0DEh ; kill the puppy mov SG_WDTCN,#0ADh ; takes 2 writes
Erik,
Read and learn ...
On my system (where the base directory is "C:\Keil") a file was written BY THE INSTALLER to:
C:\Keil\C51\Lib\INIT.A51
Unless you went for a very strange custom install, it is highly likely that you have a copy in the corresponding location of your system.
I have such a file in that location but it is not part of my builds.
from the file: ; INIT.A51: This code is executed, if the application program contains ; initialized variables at file level.
it is 'house standard' here not to have "initialized variables at file level" thus I have never seen it. So, yes, Mr Sardine and Mr. Bratwurst, I asked a question and finally got an answer, is that not what the forum is for (oh, sorry, you act as if it is for ridicule, not for information)
Anyhow it will do no good to kill the puppy there, it will already have bitten
Mr. Silly Sausage and Mr. Jack Sprat, I hate to take sides but this time I agree with Erik. Your latest arguments were abusive, non-technical and deliberately offensive. What were you trying to prove actually? Yes Erik made a couple of contentious claims in the past (I raised an eyebrow or two when he claimed to have "no bugs" at all) and I know he is not always right (who is, for god's sake) but seriously guys - keep it down to business, and down to earth!
Every time you build you link with that code. I would be amazed that you didn't know this if it were not for your apparently blanket refusal to read any documentation associated with software.
it is 'house standard' here not to have "initialized variables at file level"
How strange. Why would anyone impose such a rule?
I asked a question and finally got an answer, is that not what the forum is for
Yes, it is. There is also, however, an expectation that someone who has been using these tools for as long as you might have read the manual.
Anyhow it will do no good to kill the puppy there
The intent is that you strobe the watchdog in INIT.A51, not disable it.
it will already have bitten
Will it? How long does 'the watchdog' take to time out?
Hi, The issue is NOT 'refreshing' but 'disabling' If we can not refreshing the watchdog, i 'm afraid for the use of this chip...
If we can not refreshing the watchdog, i 'm afraid for the use of this chip...
I'm sure you can, and INIT.A51 is one of the right places to refresh it. Unfortunately I'm not familiar with this device, and neither, it would seem, is anyone else, so I guess you're just going to have to read the datasheet carefully to establish how to do it.
Hi, The issue is NOT 'refreshing' but 'disabling' If we can not refreshing the watchdog, i 'm afraid for the use of this chip... The handling of this issue (sorry Mr. Sardine) commonly accepted by all SILabs users (that have commented on this issue) is to disable the watchdog in startup.a51 and then enable it at the top of main().
now: Every time you build you link with that code
if not exist aoc.lib goto usliex del aoc.lib :usliex c:\%DDIR%\c51\bin\lib51 c aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCmain.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCutil.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCautil.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCkbpr.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCtool.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCusb.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OC485.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCcmd.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCvfd.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCnummsg.obj to aoc.lib >..\trash\trashbin c:\%DDIR%\c51\bin\lib51 a OCupdata.obj to aoc.lib >..\trash\trashbin if "%MUSDIR%"=="0" goto lnkdir rem linking for boot required c:\%DDIR%\c51\bin\bl51 OCstart.obj, OCintent.obj, OCisr.obj, OCxdata.obj, \ BOOTbit.obj, aoc.lib TO aoc.omf CODE(0x4000 - 0xFFFF) RS(256) IX >protl.log goto lnkdon
I do???
Note This message was edited to reduce width.
Slowly breathe in.
Slowly breathe out.
Relax.
Ahhhhhh.
Yes.
Slowly breathe in. Slowly breathe out. Relax. Ahhhhhh. the watchdog discussed here is an electronoic device, not a sleeping collie
PS Every time you build you link with that code was never the issue, the issue was init.a51. yes, there is a C_INIT or some such (I could look, but if you need the specific, look yourself) in the .m51 file which I have known for years, but AGAIN the issue was init.a51.
NO, confound it, NO from the .m51:
INPUT MODULES INCLUDED: MKSTART.OBJ (?C_STARTUP) MKINTENT.OBJ (MKINTENT) MKINTVEC.OBJ (MKINTVEC) MKISR.OBJ (MKISR) MKIIC.OBJ (MKIIC) MKXDATA.OBJ (MKXDATA) BOOTBIT.OBJ (BOOTBIT) AMK.LIB (MKMAIN) AMK.LIB (MKJ1708) AMK.LIB (MKTOOL) AMK.LIB (MKUTIL) C:\TOOLS\KEIL\C51\LIB\C51S.LIB (?C?CCASE) C:\TOOLS\KEIL\C51\LIB\C51S.LIB (?C?ICASE)
I added an initialization of a variable and then
C:\TOOLS\KEIL\C51\LIB\C51S.LIB (?C_INIT)
popped up
Although there aren't any Stupid Questions, some questions can reveal a questioner's level of competence. Its not that we thought that sardines were smart to begin with, but this insight into the Shoals of Sardine Thought is priceless...
(in reference to: it is 'house standard' here not to have "initialized variables at file level")
It might be that you haven't thought about it much before you posted that question, so I'll let you think about that one for a bit.
(I think that erik should provide the reason, since that would show that erik is smarter than your average fish).
</stir>
--Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
ok captain, the first thing that pops into my mind is that you cannot guaranty their order of initialization...? Am I now an new member of the sardine family?
further clarification: that matter IF there are dependencies between global variables.
I can imagine situations where it may be undesirable or impossible to initialise variables before execution of main, but cannot imagine why it would be a 'house rule'.
I think that erik should provide the reason, since that would show that erik is smarter than your average fish
I doubt that Erik's ability to explain his own house rule will reveal much about his intelligence. At least I hope not.
Every time you build you link with that code was never the issue, the issue was init.a51. yes, there is a C_INIT or some such (I could look, but if you need the specific, look yourself) in the .m51 file which I have known for years, but AGAIN the issue was init.a51.
The key point is this: What code is contained in INIT.A51?
"At least I hope not."
Pride and prejudice? I thought you preached that people should have an open mind...
Jack, Could you please to us WHY you keep on launching these personal attacks. What is it with you? You don't have to preach me about freedom of expression - I believe I vehemently resisted proposals that were made here about curtailing that right. But what you are doing is the abuse of the freedom of expression - you are bullying Erik and you do so intentionally. Whether you respect his opinions or not, I believe everybody here would be much happier you just stopped. And you still did not provide an answer to his build log. You see: I'm trying to shift the discussion to where it belongs - the proper, technical realm!
Ho Jack, and PLEASE don't start to dig up dirt about me and post it proving that I contradict myself etc. I know there is enough of it as most of the usual contributes...But most of the time I try to provide useful information, with some success I think. Do you?
he rule of no variables initialized at the declaration:
It has been there 'forever', and I recall there were many reasons, but do I remember them all, I doubt it.
First, the origin of 'the rule' has nothing to do with software. A board made for the company before the company had any engineering could not do a straight movx (the latch had to be set manually - ARGH) and thus any 'automatic code' referencing xdata would fail. We then discussed whether to have the rule just for this project or global and decided for many reasons to make it global. as I recall: One I do remember was that there were state machines with 'idle' defined as all kinds of values, the 'rule' forced all idle's to be zero which saved a whole lot of lookups. The rule forces anyone to make 'inactive' a zero, again saving a whole lot of lookups. The only case where I can see a justification for 'inactive' being anything else than zero is a SFR or port bit, I have not investigated that, but I doubt you can write sbit 0x83 = 1 and come up with p0.3 a one. also it forces 'value tables' to be 'code', again an advantage. Oh, also it allow the use of #define UC xxx unsigned char where xxx is defined as extern in all modules but one.
So, what does 'the rule' buy us? consistency
of course some feel that this is restrictive, but when you want 'program responsibility' to be transferable, you need consistency.
PS Mr. Sardine owes me an apology for his bile about init always being included, but that, I am sure would be too much to ask.
View all questions in Keil forum