FBOOT-alternative program loader for 64-bit / 32-bit Windows

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I use an Atmel microcomputer (ATmega328P) to teach my students the basics of embedded systems.

 

I used Danni's FBOOT.EXE to write a program to this microcomputer, but since FBOOT.EXE, which is a program loader on the personal computer side, is a program works on the MSDOS that directly operates the serial port, it does Not work on 64-bit Windows. (On 32-bit Windows, the operating environment equivalent to virtual86 mode is still supported, so it barely worked.)

 

Currently, most of the Windows used are 64-bit Windows, so Danni's FBOOT.EXE cannot be used. Therefore, I made a new program loader that can be used instead of FBOOT.EXE. The program loader works on 64-bit / 32-bit Windows, because of operating the serial port via the Windows API.

 

I registered it in the project area.
https://community.atmel.com/proj...

 

This program is compiled by gcc on MinGW32. The transfer speed is fixed at 38400bps. The serial ports that can be used are COM1 to COM9, and if there is only one serial port, that port is automatically found and used. You can also specify the serial port to be used explicitly.

If you enter only the program file name "prog_loader.exe" and press the enter key, simple usage examples will be displayed, so please refer to it.

 

It can be used without problems even when the PC is connected to a microcomputer via USB-serial conversion cable.
(I also connect the PC and a microcomputer via USB)

 

Feel free to use this program loader, if you need !

 

Last Edited: Fri. Oct 23, 2020 - 07:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great work but in this day and age wouldn't you just use the ubiquitous avrdude.exe + Optiboot combination that is the core of the Arduino system? (there's a pretty strong bet that will be supported whatever Microsoft may choose to do to Windows in the future!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice to meet you. Thank you for your compliment.

 

By the way,  is "the ubiquitous avrdude.exe"  a software that has the same function as FBOOT.EXE?

 

I know the optiboot, and I know avrdude.exe. If I want to write a program to a microcomputer using avrdude.exe, an ISP is required, I think.

 

Does your comment mean that, if a microcomputer is equipped  "optiboot", it is possible to write a program via the serial port by using  "the ubiquitous avrdude.exe" ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Taketoshi Iyota wrote:
By the way,  is "the ubiquitous avrdude.exe"  a software that has the same function as FBOOT.EXE?
Yes

Taketoshi Iyota wrote:
I know the optiboot, and I know avrdude.exe. If I want to write a program to a microcomputer using avrdude.exe, an ISP is required, I think.
Err no, avrdude can deal with a while range of ISP programmers, debuggers (JTAG etc) and also bootloader protocols like AVR109, STK500, STK500V2, etc Optiboot (the 328 bootloader) operates a variant of one of these.
Taketoshi Iyota wrote:
Does your comment mean that, if a microcomputer is equipped  "optiboot", it is possible to write a program via the serial port by using  "the ubiquitous avrdude.exe" ?
Indeed and the tens of millions of Arduinos in this world prove exactly that. Most have 328s and most are using Optiboot. The Arduino IDE/development code then has avrdude.exe "behind the scenes" that it then invokes to sent the built code ("sketch") from the PC to the serial bootloader in the 328. Most Arduinos have a secondary USB to TTL Serial chip on board so arvdude is actually "speaking" to the USB CDC-ACM device that the interface chip presents and then this is connected to the TX/RX pins of the AVR (usually 328). Of course if you are just using a "bare" 328 on a breadboard or something (and assuming it has been ISPd once to put Optiboot into it) then the connection to the PC+avrdude is often using one of those $2 USB-TTL cables you can get on ebay/Aliexpress/Bannggod/etc

Last Edited: Fri. Oct 23, 2020 - 03:20 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for telling me important points about  the avrdude.

 

clawson wrote:

Indeed and the tens of millions of Arduinos in this world prove exactly that. Most have 328s and most are using Optiboot. The Arduino IDE/development code then has avrdude.exe "behind the scenes" that it then invokes to sent the built code ("sketch") from the PC to the serial bootloader in the 328.

 

I understand !   So, you said  "the ubiquitous avrdude.exe" !  

 

clawson wrote:

Of course if you are just using a "bare" 328 on a breadboard or something (and assuming it has been ISPd once to put Optiboot into it) then the connection to the PC+avrdude is often using one of those $2 USB-TTL cables you can get on ebay/Aliexpress/Bannggod/etc

 

Yes, I'm using the ATmega328P in a similar way.  In my case, a USB-serial conversion module by FT231X  is used.

So, at first, I wrote Danni's bootloader to it by avrISPmkII + avrdude.exe, and then  I used FBOOT.EXE to write programs.

 

Last Edited: Sat. Oct 24, 2020 - 01:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Then you can use ISPmkII to put Optiboot into 328 then program with avrdude

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I would like to try to use the optiboot.

 

But, I think, I will continue to use the fboot in some cases, because I have a fondness for it.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Taketoshi Iyota wrote:
... it does Not work on 64-bit Windows. (On 32-bit Windows, the operating environment equivalent to virtual86 mode is still supported, so it barely worked.)
Compatibility mode is becoming less effective.

A DOS emulator might be enough.

fyi, a Windows 7 application very likely will run on Windows 10; earlier than that may, or will, have issues.

Taketoshi Iyota wrote:
Currently, most of the Windows used are 64-bit Windows, so Danni's FBOOT.EXE cannot be used.
From a very cursory read of FBOOT's source code, what's not portable :

  • dos.h
  • conio.h

Taketoshi Iyota wrote:
Therefore, I made a new program loader that can be used instead of FBOOT.EXE.
Thank you!

Taketoshi Iyota wrote:
The program loader works on 64-bit / 32-bit Windows, because of operating the serial port via the Windows API.
Into this century (barely)wink

Want to go further?

Win32 will be in Windows 10X along with web apps; there's a USB part to the web API.

 

edit : .NET appears to be in Windows 10X.

 


Make older apps or programs compatible with Windows 10 (Microsoft Support)

...

 

Compatibility mode

Runs the program using settings from an earlier version of Windows. Try this setting if you know the program is designed for (or worked with) a specific version of Windows.

...

Running Dos Emulator on 64bit Windows 10 - Microsoft Community

Application compatibility in the Windows ecosystem | Windows Experience Blog (Microsoft, Desktop App Assure)

 

fast UART bootloader ATtiny13 (0.8s) ... ATmega644 (8.2s) | AVR Freaks

 

What is new with Serial in Windows 10 - Microsoft Tech Community - 270855

by George Roussos [Microsoft]

July 29, 2015

...

In Windows 10, we added inbox support for USB CDC Abstract Control Model (ACM) compliant hardware. Usbser.sys is now installed as a compatible ID match for USB CDC compliant hardware, without requiring a 3 rd party driver or inclusion via modem INFs.

...

Windows 10 includes the Windows.Devices.SerialCommunication universal API designed for these three scenarios:

1. [Arduino, phones, tablets]

2. [USB UART]

3. [UART]

...

Microsoft introduces Windows 10X for dual-screen devices - Microsoft Tech Community - 889784

[in next to last paragraph]

... Windows 10X will let you run any application you want, no matter whether that’s a web app, UWP or Win32 application.

What's changed is the first release of Windows 10X will be for single screen.

https://www.avrfreaks.net/forum/another-win10-rant-frustration-part-3?page=4#comment-3016091

USB - Web APIs | MDN

PWA :

Progressive web apps - App Center | MDN

 

edit :

Windows 10X dual-screen APIs - Dual-screen | Microsoft Docs

An AVR loader in C# :

NuGet Gallery | ArduinoUploader 3.2.0

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sat. Oct 24, 2020 - 04:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller