Commit f6d25ecf authored by Damien George's avatar Damien George
Browse files

stmhal: Add simple README.txt to freshly-created filesystem.

parent 203bc988
......@@ -137,6 +137,21 @@ static const char fresh_pybcdc_inf[] =
#include "pybcdc.h"
static const char fresh_readme_txt[] =
"This is a Micro Python board\r\n"
"You can get started right away by writing your Python code in ''.\r\n"
"For a serial prompt:\r\n"
" - Windows: you need to go to 'Device manager', right click on the unknown device,\r\n"
" then update the driver software, using the 'pybcdc.inf' file found on this drive.\r\n"
" Then use a terminal program like Hyperterminal or putty.\r\n"
" - Mac OS X: use the command: screen /dev/tty.usbmodem*\r\n"
" - Linux: use the command: screen /dev/ttyACM0\r\n"
"Please visit for further help.\r\n"
int main(void) {
// TODO disable JTAG
......@@ -315,6 +330,11 @@ soft_reset:
f_write(&fp, fresh_pybcdc_inf, sizeof(fresh_pybcdc_inf) - 1 /* don't count null terminator */, &n);
// create readme file
f_open(&fp, "0:/README.txt", FA_WRITE | FA_CREATE_ALWAYS);
f_write(&fp, fresh_readme_txt, sizeof(fresh_readme_txt) - 1 /* don't count null terminator */, &n);
// keep LED on for at least 200ms
sys_tick_wait_at_least(start_tick, 200);
led_state(PYB_LED_R2, 0);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment