You are reading a single comment by @asez73 and its replies. Click here to read the full conversation.
  • @asez73 the characters after reset may be control codes to set the terminal up so that it doesn't wrap (which messes up the console when there are long lines). Of course it's possible (if they are received?) it's actually a side-effect of initialising the pull-up on the serial line.

    What other problems are you having?

  • Hi @Gordon,

    Well, these characters are a problem when the web IDE sends a program from the right pane to the 'Espruino'.
    For instance, see line 17 below.

    So far I failed to identify where, in Espruino interpreter, these characters were generated.
    I guess, to achieve such a result, I have to setup a full debugger with watched variables, breakpoints, gdb, openocd 0.8.0 and st-link.

    Actually, I am not far from getting gdb at work: gdb connects to openocd which connects to st-link which, in turn, connects to the Nucleo.

    At that point, the Nucleo must have an already properly loaded program such as 'blink a led' in order to not have the error 'init failed'.

    I get the number of hardware breakpoints and so on display from openocd.
    gdb allows me to load the .elf file which I compiled with NUCLEOF401RE=1 DEBUG=1 make.

    It's just a matter of setting a breakpoint at some precise line in source code and get it running in the right order. The code is started with 'continue' under gdb but never stops where I want...

    That's the moment I found your page about AdvancedDebug. So I yet have to apply/transpose those directives properly.

    As a secondary question, how do I launch the various tests available on a Nucleoboard? Obviously, your instructions are linux specifics.

    Connected
    >
    =undefined
    >echo(0);
    <<<<<{"VERSION":"1v72","BUILD_DATE":"Nov 12 2014","BUILD_TIME":"16:11:50","GIT_COMMIT":"3c4500490eb33bd2ac84a108c70a42d0bee4a83b","BOARD":"NUCLEOF401RE","CHIP":"STM32F401RET6","CHIP_FAMILY":"STM32F4","FLASH":524288,"RAM":98304,"SERIAL":"56005b00-0b513333-37343534","CONSOLE":"Serial2"}>>>>>
    =undefined
    >
    =undefined
    >reset((;
    =undefined
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v72 Copyright 2014 G.Williams
    >ÿecho(0);
    =undefined
    Uncaught SyntaxError: Got ?[255] expected EOF
     at line 1 col 1
    ÿecho(0);
     ^
    >function buttonWatcher() {
    :  console.log("Pressed at "+getTime());
    :  digitalWrite(LED1, Math.random()>0.5);
    :}
    =function () { ... }
    =undefined
    >setWatch(buttonWatcher, BTN, {edge:"both", repeat:true, debounce: 0});
    =1
    >echo(1);
    =undefined
    > 
    
About

Avatar for asez73 @asez73 started