Go Down

Topic: Error when uploading the sketch of blink twice (Read 394 times) previous topic - next topic

gnatjian

Hello,

I followed the instructions in Engineering kit. I connected the MKR1000 with the USB cable and uploaded the first sketch. It worked and the orange LED was blinking.

Then I tried button example sketch, although later I realied that I need to build a circuit to run this program. I am not sure if this opration contributes the error following.

Then I tried to upload the Blink example again, it failed and has the following error.

Couldn't find a Board on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.

Why can't it find the board? It has found already in my first trial and I did not make any change.
What should I do?

Thanks



pert

Please do this:
  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

hammy

It may just be on a different COM port.

Plug it in and look under file/port  ( it won't be COM1)

gnatjian

#3
May 13, 2019, 03:40 pm Last Edit: May 13, 2019, 03:44 pm by gnatjian
Thanks for response. I do so and see below. Is this what you need?

Code: [Select]
Couldn't find a Board on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.


Then I restarted my lap and tried to upload the Blink sketch again. There is no error but the orange light did not turn on.

Please do this:
  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.


gnatjian

It may just be on a different COM port.

Plug it in and look under file/port  ( it won't be COM1)
Yes, but I even did not switch port and make any other changes. I have succeed once and just uploaded twice.


pert

Is this what you need?
No. I need the full verbose output. Please follow my instructions. If there is something in the instructions you don't understand, then tell me what it is and I'll explain.

gnatjian

No. I need the full verbose output. Please follow my instructions. If there is something in the instructions you don't understand, then tell me what it is and I'll explain.
Thanks for your help. That was a mistake that I made. I refer to some instructions online in relevance of the basic blink sample, which described that the orange led should be light after the sketch is uploaded. Now I realized that is referred to UNO board, but not for MKR1000. I knew now that orange led in MKR1000 is delegating the status of charging.

It works now for me. Appreciate your instruction anyway.


pert

I'm glad to hear you found a solution. Enjoy!
Per

gnatjian

Code: [Select]
Arduino: 1.8.9 (Windows Store 1.8.21.0) (Windows 10), Board: "Arduino/Genuino MKR1000"

WARNING: Category 'I/o' in library MKRMotorCarrier is not valid. Setting to 'Uncategorized'
Sketch uses 10192 bytes (3%) of program storage space. Maximum is 262144 bytes.
Forcing reset using 1200bps open/close on port COM11
PORTS {COM3, COM4, COM11, } / {COM3, COM4, COM11, } => {}
PORTS {COM3, COM4, COM11, } / {COM3, COM4, COM9, COM11, } => {COM9, }
Found upload port: COM9
C:\Users\spart\OneDrive\Documents\ArduinoData\packages\arduino\tools\bossac\1.7.0/bossac.exe -i -d --port=COM9 -U true -i -e -w -v C:\Users\spart\AppData\Local\Temp\arduino_build_803895/Blink.ino.bin -R
Set binary mode
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
version()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
chipId=0x10010005
Connected at 921600 baud
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Atmel SMART device 0x10010005 found
write(addr=0x20004000,size=0x34)
writeWord(addr=0x20004030,value=0x10)
writeWord(addr=0x20004020,value=0x20008000)
Device       : ATSAMD21G18A
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
Chip ID      : 10010005
version()=v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
Version      : v2.0 [Arduino:XYZ] Dec 20 2016 15:36:43
Address      : 8192
Pages        : 3968
Page Size    : 64 bytes
Total Size   : 248KB
Planes       : 1
Lock Regions : 16
Locked       : readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
readWord(addr=0x41004020)=0xffff
none
readWord(addr=0x41004018)=0
Security     : false
Boot Flash   : true
readWord(addr=0x40000834)=0x7000a
BOD          : true
readWord(addr=0x40000834)=0x7000a
BOR          : true
Arduino      : FAST_CHIP_ERASE
Arduino      : FAST_MULTI_PAGE_WRITE
Arduino      : CAN_CHECKSUM_MEMORY_BUFFER
Erase flash
chipErase(addr=0x2000)
done in 0.881 seconds

Write 10448 bytes to flash (164 pages)
write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x2000, size=0x1000)

[===========                   ] 39% (64/164 pages)write(addr=0x20005000,size=0x1000)
writeBuffer(scr_addr=0x20005000, dst_addr=0x3000, size=0x1000)

[=======================       ] 78% (128/164 pages)write(addr=0x20005000,size=0x900)
writeBuffer(scr_addr=0x20005000, dst_addr=0x4000, size=0x900)

[==============================] 100% (164/164 pages)
done in 0.070 seconds

Verify 10448 bytes of flash with checksum.
checksumBuffer(start_addr=0x2000, size=0x1000) = f8c2
checksumBuffer(start_addr=0x3000, size=0x1000) = 260a
checksumBuffer(start_addr=0x4000, size=0x8d0) = c793
Verify successful
done in 0.009 seconds
CPU reset.
readWord(addr=0)=0x20007ffc
readWord(addr=0xe000ed00)=0x410cc601
readWord(addr=0x41002018)=0x10010305
writeWord(addr=0xe000ed0c,value=0x5fa0004)
Couldn't find a Board on the selected port. Check that you have the correct port selected.  If it is correct, try pressing the board's reset button after initiating the upload.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Please do this:
  • (In the Arduino IDE) File > Preferences
  • Uncheck the checkbox next to "Show verbose output during: compilation"
  • Check the checkbox next to "Show verbose output during: upload
  • Click "OK"
  • Sketch > Upload
  • After the upload fails, you'll see a button on the right side of the orange bar "Copy error messages" (or the icon that looks like two pieces of paper at the top right corner of the black console window in the Arduino Web Editor). Click that button.
  • In a forum reply here, click on the reply field.
  • Click the </> button on the forum toolbar. This will add the forum's code tags markup to your reply.
  • Press "Ctrl + V". This will paste the upload output between the code tags.
  • Move the cursor outside of the code tags before you add any additional text to your reply.

Hi

I have another issue when I tried to run Simulink, so I came back to run the blink sketch again to see if there are any issues in the board.

I pretty sure the sketch has been uploaded into the board, because the LED blinks with different frequency when I changed the delay time.

However as you see in the code, it still shows the error, Couldn't find a board 
By the way, the error in Simulink is no add-on uploaded to the board. Do you think thoes two errors are related?


Could you please have a look at this? Thanks

pert

If you close all Arduino IDE windows, start the Arduino IDE again, and then upload to your board, does the error message still appear?

gnatjian

That does not work. I tried several times for restarting the IDE.

It seems the problems is associated with the issue in Matlab. I found that the warning is about the motorcarrier library.

I will try.

pert

OK, strange. Is MatLab running when this error occurs?

It seems similar to this bug:
https://github.com/arduino/Arduino/issues/8851
That bug doesn't occur after restarting the Arduino IDE though. My thought is that maybe Matlab is somehow triggering the bug by its attempts to communicate with the board.

gnatjian

Well, The matlab is open but is not running with any program.I still think this is related with the Matlab.

After I added the libraries of MKRMotorCarrier and RotaryEncoder during the Hardward Setup process, the issue was fixed in both of Matlab and IDE.

Do I need to upload the MortorCarrier and Encoder libraries to the Arduino each time when I start Matlab?
I found that there are only three libraries including 'I2C','Servo'and'SPI' when I restart the Matlab. Is this what it should be?

By the way, could you please also look at another subject 'About Delpoying the simulink model to MKR1000' that I posted? Appreciate your help.

pert

Unfortunately I don't have any experience with Matlab or Simulink. Hopefully someone else here does and will be able to answer your questions.

Go Up