#10 closed task (fixed)

ATMEGA8A: USART simulation (with pty connection)

Reported by: dsl Owned by: dsl
Priority: major Milestone: MCUSim-0.2
Component: avr Keywords: planned-in-0.2
Cc:

Description (last modified by dsl)

Simulated MCU may have its internal USART connected to a pseudo terminal
available in the host operating system.

Bootloader inside a simulated MCU may use USART to read
from a pty master to receive anything from a slave side /dev/pts/*. Take a look
at the POSIX function to open pseudo terminal: posix_openpt().

The main idea is to let avrdude upload a firmware to the simulated MCU.

We'll be able to pair MCUSim and Arduino IDE in this case, for example.
Improved integration between existing tools to work with AVR and MCUSim is a
goal.

Optiboot is a good example of a bootloader which implements a subset of
STK500 communication protocol. It can be used to test idea of the ticket.

Personally, I'd want to start MCU simulation with a bootloader .hex file passed
via parameters on the one hand, and Arduino IDE (or any other program which can
program AVR using SPI) with a sketch file to be compiled and uploaded into the
simulated MCU on the other.

Attachments (2)

bootloader_faq.pdf (138.1 KB) - added by dsl 14 months ago.
AVR Bootloader FAQ Written by Brad Schick (May 19, 2009)
Termios-script-diagram.svg (5.7 KB) - added by dsl 14 months ago.
Pseudo terminal master and slave

Download all attachments as: .zip

Change History (12)

comment:1 Changed 20 months ago by dsl

Description: modified (diff)

There is a good picture to remind yourself how to deal with master-slave pair of PTY devices

comment:2 Changed 14 months ago by dsl

Milestone: 0.2.00.2

Milestone renamed

comment:3 Changed 14 months ago by dsl

Milestone: 0.2MCUSim-0.2

Milestone renamed

comment:4 Changed 14 months ago by dsl

Description: modified (diff)
Summary: Connection between a simulated USART inside MCU and a pseudo terminalATMEGA8A: USART simulation (including a connection with pseudo terminal)

comment:5 Changed 14 months ago by dsl

Description: modified (diff)
Milestone: MCUSim-0.2Work in Progress
Status: newaccepted
Summary: ATMEGA8A: USART simulation (including a connection with pseudo terminal)ATMEGA8A: USART simulation (with pty connection)

Changed 14 months ago by dsl

Attachment: bootloader_faq.pdf added

AVR Bootloader FAQ Written by Brad Schick (May 19, 2009)

comment:7 Changed 14 months ago by dsl

Keywords: planned-in-0.2 added; planned-in-0.2.0 removed

Changed 14 months ago by dsl

Attachment: Termios-script-diagram.svg added

Pseudo terminal master and slave

comment:8 Changed 14 months ago by dsl

Description: modified (diff)

comment:9 Changed 13 months ago by dsl

I think that this issue is almost finished in 0.1.0121.
There are some minor changes to apply including a correct read-thread shutdown
and MISRA fixes for msim_pty.c.

comment:10 Changed 10 months ago by dsl

Milestone: Work in ProgressMCUSim-0.2
Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.