You need to log in to create posts and topics.

ATmega128 printf() not working in SimulIDE 1.1.0-SR2

Hello,

I found an issue with printf() when simulating the ATmega128 in SimulIDE.

Environment:

  • SimulIDE: 1.1.0-SR2

  • OS: Windows 11

  • Compiler: AVR-GCC 5.4.0 (AVR 8-bit GNU Toolchain 3.6.2, Microchip Studio 7)

  • MCU: ATmega128, 16 MHz

  • UART0: 9600 baud

Problem:

Direct UART output and puts() work correctly, but printf() produces no output. The same functionality works correctly with the ATmega328P in SimulIDE.

I also tested the sprintf() example from this earlier report:

https://simulide.com/p/forum/topic/avr-atmega128-sprintf-sscanf-not-working/

The following statement still does not work in SimulIDE 1.1.0-SR2:

sprintf(buffer, "\r\nTest %d", 10);

These issues may be related.

Attached files:

I've attached print_ex.zip, which contains two test examples:

  • ATmega128 (issue reproduced): printf_ex.c and printf_ex.sim1

  • ATmega328P (working reference): printf_ex_atmega328p.c and printf_ex_atmega328p.sim1

The two C source files are identical. The ZIP also includes compiled HEX/ELF files for both MCUs.

Could you please investigate this issue?

Thank you!

Uploaded files: