Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

How do I get CPX to write to log.txt?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

How do I get CPX to write to log.txt?

by djotaku on Tue Jul 14, 2020 6:51 pm

Here is my code: https://makecode.com/_LL4ic16V0DLX

I'm trying to debug why, despite using random, I'm getting exactly the same sequence of outputs every time on the physical device. (The emulator on the website seems to be sufficiently random),

What I'm doing:

Hold the center button down - load the uf2 file into CPLAYBOOT.

Then it automatically unmounts CPLAYBOOT and I have MAKECODE to mount.

I mount MAKDECODE and I see the following files:

  • current.uf2
  • dmesg.txt
  • info_uf2.txt
  • spiflash.bin

Pushing button A does not cause log.txt to appear (and, therefore, also does not write to it).

I've tried refreshing the mount point in the file browser (KDE's Dolphin). Nothing new appears.

In case it helps for debugging - dmesg.txt:

Code: Select all | TOGGLE FULL SIZE
tcc_ind: 2 clk_index: 4
SET APP
tc_ind: 2 clk_index: 4
SPI instance 0x42001400 req 250kHz, got 250kHz baud=95
USB start delayed
mount SNORFS, rows=31
USB start delayed
USB start
USB EORST
USB EORST
stall IN 0
stall IN 0
stall IN 0
stall IN 0
get max lun



Info_uf2.txt:

Code: Select all | TOGGLE FULL SIZE
UF2 Bootloader v2.0.0-adafruit.5 SFHWRO
Model: CPlay Express
Board-ID: SAMD21G18A-CPlay-v0



Here's a screenshot of the code in case for some reason the link to the MakeCode website gets botched:

code where logging doesn't work.png
code where logging doesn't work.png (114.18 KiB) Viewed 34 times

djotaku
 
Posts: 7
Joined: Tue Jul 14, 2020 6:40 pm

Re: How do I get CPX to write to log.txt?

by djotaku on Wed Jul 15, 2020 9:42 pm

I updated my bootloader to v3.10. Still getting the same behavior.

djotaku
 
Posts: 7
Joined: Tue Jul 14, 2020 6:40 pm

Please be positive and constructive with your questions and comments.