This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code Compiled, linked, downloaded but not running

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

Parents
  • 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

    Erik

Reply
  • 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

    Erik

Children
  • 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!

  • I have such a file in that location but it is not part of my builds.

    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...

  • Tamir,

    It would seem that your threshold for opinionated arrogance is higher than mine.

    Anyway ... I understand what you say, and will try to refrain.

  • I hate to take sides but this time I agree with Erik. Your latest arguments were abusive, non-technical and deliberately offensive.

    First off, if you agree with Erik you will be agreeing that I treated his behaviour with ridicule. This is correct. 'Abusive' and 'offensive' are quite a different matter. I would suggest that the use of profanity would be classed as offensive, this is quite typical of Erik's behaviour on this forum. I have also noticed that you are not averse to using language that would be considered blasphemy by at least one of the major global religions.

    What were you trying to prove actually? Yes Erik made a couple of contentious claims in the past

    The things that irritate are his barracking arrogance, refusal to follow his own advice, refusal to read and understand what others write, inability to understand that there are alternative approaches to many problems rather than the one deemed correct by him, inability to ever follow any discussion through to its conclusion if that conclusion reveals him to be wrong and so on.

    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!

    I think you need to put your own house in order before you start to dictate who should say what on this forum.

  • I have also noticed that you are not averse to using language that would be considered blasphemy by at least one of the major global religions

    I don't know if you meant it like that, but you made me laugh...if I hurt your religious feelings I apologize.

    I think you need to put your own house in order before you start to dictate who should say what on this forum.

    Ouch. What a punch line! Do you mean me trying to make a hit on Marleen (ops. my girl is not going to like this post hahahahaha) :-) :-) or the religious stuff?!!?!?!?

  • 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???

    Erik

    Note
    This message was edited to reduce width.

  • Slowly breathe in.

    Slowly breathe out.

    Relax.

    Ahhhhhh.

  • Slowly breathe in.
    Slowly breathe out.
    Relax.
    Ahhhhhh.

    the watchdog discussed here is an electronoic device, not a sleeping collie

    Erik

    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.

    Erik

  • I do???

    Yes.

    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)
    

    Erik

    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...

    How strange. Why would anyone impose such a rule?

    (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.