Project

General

Profile

"always-on device" with the blue pill?

Added by Rolf 29 days ago

Hi,
trying desperately to compile a program (forth), which is running well in RAM, to flash memory of a "blue pill". The program starts like this:

<<<core>>>
compiletoflash
include ../../src_forth/rf69.fs
...
...

This is the console output:

!send schalter.fs
2> rf69.fs 4: [WRITE ERROR! /dev/serial/by-path/pci-0000:00:1d.1-usb-0:1:1.0]

[disconnected] Serial port busy

Did anyone flash the blue pill successfully or have an idea what might be wrong?

Thanks,

Rolf


Replies (6)

RE: "always-on device" with the blue pill? - Added by linuxpeppe 24 days ago

Hi Rolf.
I use bluepill and forth sometime. I use folie on linux to flash the firmware.
How can help you? Are you on Mac or Linux?

Giuseppe

RE: "always-on device" with the blue pill? - Added by linuxpeppe 24 days ago

Did you try "-r" flag for folie?

RE: "always-on device" with the blue pill? - Added by Rolf 23 days ago

Hi Guiseppe,
thanks for your answer! I am on Linux. The -r Flag was added and the upload (!send filename.fs) works well, when I compile to RAM. In that case the code looks like this:

forgetram

\ <<<core>>>

\ compiletoflash

include ../../src_forth/rf69.fs
...

I connected the blue pill via USB, using it's USB-connector and USB-console (flashed usb-common.bin with stlink before). May be I should access via the serial interface?

Meanwihle I tried it with another program, to see if the included file rf69.fs makes the problem (which was missing in this case). It does not work as well. So rf69.fs is not the problem.

Rolf

RE: "always-on device" with the blue pill? - Added by linuxpeppe 20 days ago

Hi Rolf.
Try to upload the code commenting the word <<< core >>> cause calling a cornerstone
will reset bluepill and i think you lose connection.
JCW wrote about cornestone in:
https://jeelabs.org/article/1718a/

If it does not work you can post me a file to give a try in my bluepill.

Giuseppe

RE: "always-on device" with the blue pill? - Added by Rolf 20 days ago

Hi Guiseppe,
thanks a lot for your help, especially for the link to JCWs article (I read it once, but it is not easy to find it again, when you need it). Now it is workking, commenting out the call to the cornerstone. But there is the next problem. The program ends with

: init init unattended rf-l ;

(rf-l beeing the "main" word). The compiler does not find the word unattended. Do you know in which library it should be for the Blue Pill?

Rolf

RE: "always-on device" with the blue pill? - Added by linuxpeppe 17 days ago

Hello.
Not sure about "unattended" definition for blue pill, but you can find an example as used in jz4:
https://github.com/jeelabs/embello/blob/master/explore/1608-forth/jz4/board.fs
and some explanation at:
https://jeelabs.org/article/1652c/
I use it on serial TTL STM32L05x but I don't know if it work on STM32F103 USB uart driver.
Let me know if you try.

Happy New Year
Giuseppe

    (1-6/6)