G Mc

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Newbie mDot Blinky not working #30957
    G Mc
    Participant

    I have not resolved the issue, but I have narrowed it down to a problem when the IDE transfers the compiled file to the MDot. This could be used as a workaround.

    I’ve managed to narrow it down this way:
    1) Build the project in the IDE – observe the LED’s on the developer board blinking which occurs when a file is copied to the “shared drive” on the mDot.
    2) Observe that my Blinky program does not operate.

    Continuing on from above to show that the compiler generated binary is just fine, the next steps are:
    3) Locate the compiled binary (as produced by the IDE) using windows explorer.
    4) Manually copy and paste it to the mDot Shared drive. Again observe the LED’s blinking which occurs when a file is copied to the “shared drive”.
    5) Observe that the blinky program *does* operate as expected.

    I’ve repeated this same process multiple times by changing the delay value (i.e. the rate of blinking) and observed that at step 5, the LED on the will blink at a rate corresponding to the delay that I specified in the program at step 1.

    Unfortunately, I’ve been distracted by a few other projects and have had to put any further investigation on hold.

    I hope this helps and thanks for your comment

    in reply to: Newbie mDot Blinky not working #30656
    G Mc
    Participant

    Another update, I think the problem somehow relates to how the Studio transfers the compiled code to the mDot.

    Using the information here: https://os.mbed.com/docs/mbed-studio/current/installing/switching-to-gcc.html

    I have managed to ensure that mbed studio compiles uses ARM-GCC to compile the program. However, the LED still does not blink when the “blinky” program is compiled via the studio.

    If I compile the same code (i.e. the same project directory) using the CLI as described above, the LED does blink.

    Eventually, I noted (via a binary diff) that the binary files produced from the studio and CLI are 100%, byte for byte identical.

    So, I changed the code in the Studio (I vary the blink rate between 100ms and 1000ms), I compiled the code in Studio (no blinking LED). Next I manually copied the .bin file (produced by the Studio) to the mDot’s drive and miraculously, the LED started blinking. I’ve repeated this step several times with different blink delays and a manual copy of the .bin file to the mDot’s USB drive does install and run the Studio compiled program.

    But, I shouldn’t have to manually copy this file – What am I missing????

    I’ve noticed the following messages in the Studio (which seem to indicate that it is transferring the binary via the USB drive):

    <quote>
    Build of mbed-os-example-blinky completed: Program compiled
    PyOCD deploy failed, deploying using mass storage device…
    mbed-os-example-blinky deployed, board may require restarting
    </quote>

    FWIW, Restarting the board as suggested in the above output doesn’t get the program running either.

    Any ideas as to proceed greatly appreciated.

    in reply to: Newbie mDot Blinky not working #30655
    G Mc
    Participant

    Hi @Jason, If I click the libraries tab in the Studio, there is just one library as follows:


    mbed-os 5.15.3
    Commit: b6370b4c37f3d4665ed1cdcb1afea85396bba1b3
    Imported from: https://github.com/ARMmbed/mbed-os/

    I’m guessing that that this is the version you mention.

    How do I roll back to GCC in the studio?
    I did find this fairly recent post https://forums.mbed.com/t/mbed-studio-gnu-arm-gcc/5429 which says it is impossible to switch back to GCC_ARM.

    Again, I am a Newbie when it comes to mBed (although I do have experience with other platforms such as Rasberry PI, Arduino, ESP etc).

    in reply to: Newbie mDot Blinky not working #30647
    G Mc
    Participant

    Update: I finally managed to get the mbed cli downloaded and working using pip (as opposed to the windows installer).

    When I import the program and compile it using the CLI, the blink program blinks the LED (as expected).

    So the question remains what is going wrong when I try to use the MBED IDE?
    If I import the same program into the IDE and run it from the IDE the program does not blink the LED.

    Here are the mbed cli commands that I used:

    
    mbed import https://github.com/ARMmbed/mbed-os-example-blinky
    cd mbed-os-example-blinky
    mbed compile --target MTS_MDOT_F411RE --toolchain GCC_ARM --flash
    

    FWIW, the output of the mbed compile command looks similar to the output generated within the IDE.

    There is however one noticeable difference. The final line of the output from the CLI reads:
    Image: .\BUILD\MTS_MDOT_F411RE\GCC_ARM\mbed-os-example-blinky.bin

    Whereas the final line from the IDE reads:
    Image: BUILD/MTS_MDOT_F411RE/ARMC6\mbed-os-example-blinky.bin

    Does this imply a different tool chain? Is this the problem? If so, how do I change this in the IDE?

Viewing 4 posts - 1 through 4 (of 4 total)