SmartPortSD - lets build it!

JDW

Administrator
Staff member
Founder
Sep 2, 2021
2,189
1,805
113
54
Japan
youtube.com
I've seen a few "SmartPort" SD card drive products pop up over the years, and each time I wondered what advantages they had over the venerable FloppyEMU. It's often a cost advantage, not a feature advantage. Most of the SmartPort SD card drives are just that — SmartPort-only, with no means of booting from a floppy disk image. The FloppyEMU costs more than the SmartPort hard disk only solutions, but you are basically paying for the ability to use it either as a SmartPort hard disk (with 4 drives to choose from), or floppy disk. The wDrive offered similar functionality, but as you may expect, the cost isn't that much cheaper than a FloppyEMU, and it appears to be unavailable these days too. (I personally think the FloppyEMU is more aesthetically pleasing than the wDrive, if such matters to you.)

For people like me who already own two FloppyEMU units (both with the acrylic cases on them), I've never been tempted to get a SmartPort-only solution because I already have that functionality. But for people who don't have the FloppyEMU or anything similar, deciding what to buy for an Apple II machine can be a bit challenging. It really boils down to what Apple II machine you have. In my case, my only Apple II is a IIc, so I tend to focus on those products.

If you too have a IIc and are considering a FloppyEMU so as to get floppy drive emulation, there is one important consideration. The internal floppy drive on an Apple IIc is the boot disk drive. Attach an external disk drive and put a disk in it and power on, and nothing will happen because you can't boot from external disk drives. At least, not unless you want to change that! :) I have a ROM Xc which offers a "software" switch that will allow an externally attached floppy disk drive (real or FloppyEMU) to become the boot floppy drive. However, there are a few programs that don't play well with it, and those compatibility quirks ultimately led me to buy the BMOW Drive Switcher. The Drive Switcher is a hardware solution for the IIc. It sticks out on the back a little bit, but a tiny DIP switch lets you choose if you want the default behavior or if you want to make the externally attached FloppyEMU to be the boot drive. It works with all programs. No compatibility quirks.

If you have a FloppyEMU and an Apple IIc and no Drive Switcher, then you can only boot floppy disks from the IIc's internal floppy drive, but any bootable SmartPort volumes attached to the back port will be bootable whenever you don't have any floppy disk in the internal drive. For example, just leave a floppy out of the internal drive and put Total Replay on your SmartPort hard disk, and you can then boot from your Total Replay drive and enjoy all the games.

If you want something lower cost than the FloppyEMU and if you only care about SmartPort hard drive emulation (not floppies), then we can get back to the title of this thread by proclaiming that @Kay K.M.Mods has his new SPIISD kit out now which offers a FloppyEMU style experience with OLED screen and the PCB attached by ribbon cable:


It is only a SmartPort Hard Disk emulator and not a Floppy Disk Drive emulator, but if you are OK with that, it's a nice solution.

Kay's excellent blog article below explains how the SPIISD v1 (now v2) evolved out of the SmartPortSD open source project:

 

JDW

Administrator
Staff member
Founder
Sep 2, 2021
2,189
1,805
113
54
Japan
youtube.com

billbucks

New Tinkerer
Oct 23, 2023
75
14
8
I got confirmation that the VGA mini card is not compatible. I think I will give it a try with the RGB to SCART cable to test on a TV, and then see if a SCART to VGA o HDMI would work.
I got the following reference link about using the SCART cable: https://www.oldtechnewtech.com/scart-lcd-monitors-with-the-apple-iigs/
About the HD emulatorsfor Apple ii gs:
- SPIISD V2 DIY KIT looks interesting (HD only) and works at $71 fully assembled + accessories = total of $100 approx for the shipment ($20 can be saved with the smaller screen and with the kit to assemble)
- Floppy Emu Deluxe bundle is $150 inc shipment so more expensive but supports the floppy emulator
- ReActiveMicro Drive/Turbo + CF card costs $95 + $ 26 (3 weeks lead time) = $120

UPDATE: I also found the XDrive device: https://maceffects.com/products/xdrive-mass-storage-solutions-for-the-apple-ii-ii-iie-and-iigs
 
Last edited:
  • Like
Reactions: JDW

hexbus

New Tinkerer
Feb 27, 2025
4
3
3
FYI: I added some comments to Chris' SmartportSD inside someone else's issue: https://github.com/djtersteegc/smartportsd/issues/4

We have a few of us that have built these locally and are using the 9-pin connector, and can't get our Apple IIC/IIGS to recognize and boot from the unit.

I can see the initial debug messages from the initial code, and also can turn debug on with @eric's code on my PC, but when hooked to the IIGS, the unit simply isn't recognized as a bootable device, even though the PC debug initially states with both codebases that it sees the valid bootable Total Replay Part1.PO on the FAT32 formatted microSD.

I also see that others are having a SDFat issue with 1.x versions needing to be used, otherwise latest 2.x versions cause errors in compilation.

Hopefully this helps anyone else building or trying to use these to know what other people are going through right now. I plan on keeping my post here updated and/or the issue updated on Git (or opening a new one if Chris wants me to) so that others can utilize it if needed for reference. This post and Chris' repo seem to come up first when a search is done in Google.
 

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
I finally, finally managed to get time to build the DB25-->DB19 cable (wired the same as the DuoDisk drive cable). I can indeed confirm the firmware works with a IIgs. Here's mine fully assembled and connected (hooked up via RCA through a USB capture device)

Huge thanks for BMOW for the wiring diagrams necessary to get this working. First the pin mapping:

Then the pinout for a DB25 connector:

And finally BMOW for the pinout/diagram for the DB19 (specifically the connector part on the PCB has the pins numbered for 1 through 10 and 11 through 19):
 

Attachments

  • working.jpg
    working.jpg
    1.8 MB · Views: 105
  • Like
Reactions: hexbus and JDW

hexbus

New Tinkerer
Feb 27, 2025
4
3
3
It’s taken me a while too! I made an adapter for those who need one - I’ll be placing them in GitHub and putting them on Tindie.

Seen below is some of my work figuring out the pinout thanks to updates to the repo (thanks, Chris!). As well as a homemade 9 pins across to 25 pin adapter. And my 9 to 19 pin board design based on the Fujinet adapter.

Also, figured out the Adafruit SD adapter works if you want to connect small wires and not desolder posts.

I need to get a repo going here soon. I have some of the purple adapters that are correct but wrong silkscreen and the green adapters that are correct.
 

Attachments

  • IMG_1119.jpeg
    IMG_1119.jpeg
    1.6 MB · Views: 116
  • IMG_1122.jpeg
    IMG_1122.jpeg
    1.7 MB · Views: 120
  • IMG_1126.jpeg
    IMG_1126.jpeg
    1.1 MB · Views: 110
  • IMG_1127.jpeg
    IMG_1127.jpeg
    814.1 KB · Views: 119
  • IMG_1128.jpeg
    IMG_1128.jpeg
    806.9 KB · Views: 118
  • IMG_1130.jpeg
    IMG_1130.jpeg
    1.2 MB · Views: 114
  • IMG_1136.jpeg
    IMG_1136.jpeg
    1.7 MB · Views: 107
  • IMG_1143.jpeg
    IMG_1143.jpeg
    943.7 KB · Views: 126
  • IMG_1195.jpeg
    IMG_1195.jpeg
    1.3 MB · Views: 128
  • IMG_1404.jpeg
    IMG_1404.jpeg
    897.3 KB · Views: 113
  • IMG_1406.jpeg
    IMG_1406.jpeg
    834.5 KB · Views: 115
  • IMG_1407.jpeg
    IMG_1407.jpeg
    1.9 MB · Views: 112
  • IMG_1401.jpeg
    IMG_1401.jpeg
    1.8 MB · Views: 131
  • Like
Reactions: Stinkerton18

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
It’s taken me a while too! I made an adapter for those who need one - I’ll be placing them in GitHub and putting them on Tindie.

Seen below is some of my work figuring out the pinout thanks to updates to the repo (thanks, Chris!). As well as a homemade 9 pins across to 25 pin adapter. And my 9 to 19 pin board design based on the Fujinet adapter.

Also, figured out the Adafruit SD adapter works if you want to connect small wires and not desolder posts.

I need to get a repo going here soon. I have some of the purple adapters that are correct but wrong silkscreen and the green adapters that are correct.
That's both awesome and now I feel incredibly foolish for soldering 21 freaking wires to 19 pins, when I only really needed 9. 😒 Oh well, at least now I know I have a cable that would also work just fine with a DuoDrive...if I ever get my hands on one of those and 5/14" floppies.
 

hexbus

New Tinkerer
Feb 27, 2025
4
3
3
That's both awesome and now I feel incredibly foolish for soldering 21 freaking wires to 19 pins, when I only really needed 9. 😒 Oh well, at least now I know I have a cable that would also work just fine with a DuoDrive...if I ever get my hands on one of those and 5/14" floppies.
Heh, I’m lazy and didn’t want to attach the 25 pin connector to the new devices I had built. I have 19 more “kits” in bags that I need to get rid of (hence the idea to open a Tindie store since I had all the parts), so I decided to make life easier and create an adapter PCB with 9 pins instead.

I have three units built now. My only gripe is the need to turn the computer off and on once the lights blink to switch the disk image - rebooting doesn’t seem to do it.
 

Attachments

  • IMG_1427.jpeg
    IMG_1427.jpeg
    1 MB · Views: 105
  • Like
Reactions: Stinkerton18

@GamesMissed

New Tinkerer
Mar 28, 2025
13
1
3
gamesthatimissed.com
I got confirmation that the VGA mini card is not compatible. I think I will give it a try with the RGB to SCART cable to test on a TV, and then see if a SCART to VGA o HDMI would work.
I have an older Manila Gear IIgs-to-VGA adapter, but were I to buy something today I'd try BMOW's Mac Sync-inator (https://www.bigmessowires.com/mac-sync-inator/). He has instructions for using it with a IIgs as well.

I line the 15 kHz VGA from my video adapter into a GBS Control box (https://ramapcsx2.github.io/gbs-control/Wiki/) that I put together. The GBS-C cleans up the timing and outputs 31 kHz VGA, which makes life a lot easier. And, the output looks beautiful. I haven't tried piping that into a VGA-to-HDMI adapter yet.

iigs_games_02.jpgiigs_games_03.jpg
 

billbucks

New Tinkerer
Oct 23, 2023
75
14
8
I'd like to try the SmartPort SD to use as an, HD emulator for a 2GS since I have a floppy drive. What firmware do I need for the 2GS and is it now stable ?
I looked at Github and I'm not sure which file(s) to send to a maker (e.g. PCBWay) from the Gerbers folder. Any help would be appreciated.
I found the BOM which is clear.
 

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
I'd like to try the SmartPort SD to use as an, HD emulator for a 2GS since I have a floppy drive. What firmware do I need for the 2GS and is it now stable ?
I looked at Github and I'm not sure which file(s) to send to a maker (e.g. PCBWay) from the Gerbers folder. Any help would be appreciated.
I found the BOM which is clear.
The firmware in that repo is not for the IIGS, it's for flashing onto the Arduino and is based on which of the two models you're building (SMD or through hole soldering).

As for the gerbers, you zip up the entire gerbers folder to upload to JLCPCB or PCBWay. All of the files in that folder are necessary.
 

hexbus

New Tinkerer
Feb 27, 2025
4
3
3
  • Like
Reactions: Stinkerton18

GondolinOnMyMind

New Tinkerer
Mar 14, 2023
26
9
3
All,

I have issues compiling the code. I have installed Arduino Ide v2.3.6 on Sequoia 15.7. and to my understanding also installed the required modules. Now I'm totally inept what comes to programming, and programming a microcontroller specially. This is my first try to do something myself.

I do get quite a lot error messages during compile. How could I get the code compiled successfully?

Code:
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino: In function 'void loop()':
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:410:103: error: use of deleted function 'device::device(const device&)'
                   encode_status_dib_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);
                                                                                                       ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:94:8: note: 'device::device(const device&)' is implicitly deleted because the default definition would be ill-formed:
 struct device{
        ^~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:94:8: error: use of deleted function 'File32::File32(const File32&)'
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatVolume.h:26:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatLib.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:31,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:1087:7: note: 'File32::File32(const File32&)' is implicitly deleted because the default definition would be ill-formed:
 class File32 : public StreamFile<FatFile, uint32_t> {
       ^~~~~~
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:1087:7: error: use of deleted function 'StreamFile<FatFile, long unsigned int>::StreamFile(const StreamFile<FatFile, long unsigned int>&)'
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatFile.h:882:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatVolume.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatLib.h:28,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:30,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:76:7: note: 'StreamFile<FatFile, long unsigned int>::StreamFile(const StreamFile<FatFile, long unsigned int>&)' is implicitly deleted because the default definition would be ill-formed:
 class StreamFile : public stream_t, public BaseFile {
       ^~~~~~~~~~
/Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:76:7: error: 'constexpr FatFile::FatFile(const FatFile&)' is private within this context
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatVolume.h:26:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatLib.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:31,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:156:3: note: declared private here
   FatFile(const FatFile& from) = default;
   ^~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1185:6: note:   initializing argument 1 of 'void encode_status_dib_reply_packet(device)'
 void encode_status_dib_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:423:99: error: use of deleted function 'device::device(const device&)'
                   encode_status_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);       
                                                                                                   ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1015:6: note:   initializing argument 1 of 'void encode_status_reply_packet(device)'
 void encode_status_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:470:108: error: use of deleted function 'device::device(const device&)'
                   encode_extended_status_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);       
                                                                                                            ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1085:6: note:   initializing argument 1 of 'void encode_extended_status_reply_packet(device)'
 void encode_extended_status_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1

Compilation error: use of deleted function 'device::device(const device&)'
 

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
All,

I have issues compiling the code. I have installed Arduino Ide v2.3.6 on Sequoia 15.7. and to my understanding also installed the required modules. Now I'm totally inept what comes to programming, and programming a microcontroller specially. This is my first try to do something myself.

I do get quite a lot error messages during compile. How could I get the code compiled successfully?

Code:
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino: In function 'void loop()':
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:410:103: error: use of deleted function 'device::device(const device&)'
                   encode_status_dib_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);
                                                                                                       ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:94:8: note: 'device::device(const device&)' is implicitly deleted because the default definition would be ill-formed:
 struct device{
        ^~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:94:8: error: use of deleted function 'File32::File32(const File32&)'
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatVolume.h:26:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatLib.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:31,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:1087:7: note: 'File32::File32(const File32&)' is implicitly deleted because the default definition would be ill-formed:
 class File32 : public StreamFile<FatFile, uint32_t> {
       ^~~~~~
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:1087:7: error: use of deleted function 'StreamFile<FatFile, long unsigned int>::StreamFile(const StreamFile<FatFile, long unsigned int>&)'
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatFile.h:882:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatVolume.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/ExFatLib.h:28,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:30,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:76:7: note: 'StreamFile<FatFile, long unsigned int>::StreamFile(const StreamFile<FatFile, long unsigned int>&)' is implicitly deleted because the default definition would be ill-formed:
 class StreamFile : public stream_t, public BaseFile {
       ^~~~~~~~~~
/Users/username/Documents/Arduino/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:76:7: error: 'constexpr FatFile::FatFile(const FatFile&)' is private within this context
In file included from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatVolume.h:26:0,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatLib.h:27,
                 from /Users/username/Documents/Arduino/libraries/SdFat/src/SdFat.h:31,
                 from /Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:52:
/Users/username/Documents/Arduino/libraries/SdFat/src/FatLib/FatFile.h:156:3: note: declared private here
   FatFile(const FatFile& from) = default;
   ^~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1185:6: note:   initializing argument 1 of 'void encode_status_dib_reply_packet(device)'
 void encode_status_dib_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:423:99: error: use of deleted function 'device::device(const device&)'
                   encode_status_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);      
                                                                                                   ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1015:6: note:   initializing argument 1 of 'void encode_status_reply_packet(device)'
 void encode_status_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:470:108: error: use of deleted function 'device::device(const device&)'
                   encode_extended_status_reply_packet(devices[(partition + initPartition) % NUM_PARTITIONS]);      
                                                                                                            ^
/Users/username/git/SmartportSD-1.15/SmartportSD-1.15.ino:1085:6: note:   initializing argument 1 of 'void encode_extended_status_reply_packet(device)'
 void encode_extended_status_reply_packet (device d)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1

Compilation error: use of deleted function 'device::device(const device&)'
You're using too new a library and Arduino IDE. The original code was written for Arduino 1.8.X and the FAT32 library from 2021. Newer IDEs and libraries depreciated many of the functions in the code, hence the "Compilation error: use of deleted function" error you're getting.

Eric's more updated code was ported to PortIO to make it more current. Use his code from his Github repository here: https://github.com/erichelgeson/smartportsd
 

GondolinOnMyMind

New Tinkerer
Mar 14, 2023
26
9
3
Thanks @Stinkerton18 for your help.

I have now installed both vscode and platformio, along with library adafruit/sdfat. I did also with Greimans original(?) library, but that produced even more errors.

Now when building the project I get
Code:
Processing nanoatmega328 (platform: atmelavr; board: nanoatmega328new; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/nanoatmega328new.html
PLATFORM: Atmel AVR (5.1.0) > Arduino Nano ATmega328 (New Bootloader)
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 30KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES: 
 - framework-arduino-avr @ 5.2.0 
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SdFat - Adafruit Fork @ 2.3.54
Building in release mode
Compiling .pio/build/nanoatmega328/src/SmartportSD.cpp.o
Compiling .pio/build/nanoatmega328/src/packet_16mhz.S.o
Compiling .pio/build/nanoatmega328/src/src/SmartportSD.cpp.o
Compiling .pio/build/nanoatmega328/lib879/SPI/SPI.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatDbg.cpp.o
src/SmartportSD.cpp:1335:23: warning: multi-character character constant [-Wmultichar]
   packet_buffer[21] = 'Sm';  //ID string (16 chars total)
                       ^~~~
src/SmartportSD.cpp:1337:23: warning: character constant too long for its type
   packet_buffer[24] = 'artport';
                       ^~~~~~~~~
src/SmartportSD.cpp:1339:23: warning: character constant too long for its type
   packet_buffer[32] = ' SD    ';
                       ^~~~~~~~~
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatFile.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatFilePrint.cpp.o
src/src/SmartportSD.cpp:1335:23: warning: multi-character character constant [-Wmultichar]
   packet_buffer[21] = 'Sm';  //ID string (16 chars total)
                       ^~~~
src/src/SmartportSD.cpp:1337:23: warning: character constant too long for its type
   packet_buffer[24] = 'artport';
                       ^~~~~~~~~
src/src/SmartportSD.cpp:1339:23: warning: character constant too long for its type
   packet_buffer[32] = ' SD    ';
                       ^~~~~~~~~
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatFileWrite.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatFormatter.cpp.o
Archiving .pio/build/nanoatmega328/lib879/libSPI.a
src/SmartportSD.cpp: In function 'void loop()':
src/SmartportSD.cpp:577:98: warning: left shift count >= width of type [-Wshift-count-overflow]
                 block_num = block_num + (((LBT & 0x7f) | (((unsigned short)LBH << 5) & 0x80)) << 16);
                                                                                                  ^~
src/SmartportSD.cpp:249:37: warning: unused variable 'LBX' [-Wunused-variable]
   unsigned char LBH, LBL, LBN, LBT, LBX;
                                     ^~~
src/SmartportSD.cpp: In function 'uint8_t decode_data_packet()':
src/SmartportSD.cpp:911:48: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
     packet_buffer[i] = ((packet_buffer[13] << i+1) & 0x80) | (packet_buffer[14+i] & 0x7f);
                                               ~^~
src/SmartportSD.cpp: In function 'void encode_status_reply_packet(device)':
src/SmartportSD.cpp:1047:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff;
                          ^~
src/SmartportSD.cpp: In function 'void encode_extended_status_reply_packet(device)':
src/SmartportSD.cpp:1117:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff;
                          ^~
src/SmartportSD.cpp:1118:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[4] = (d.blocks >> 24 ) & 0xff;
                          ^~
src/SmartportSD.cpp: In function 'void encode_status_dib_reply_packet(device)':
src/SmartportSD.cpp:1213:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff ; //block size 3
                          ^~
Indexing .pio/build/nanoatmega328/lib879/libSPI.a
src/SmartportSD.cpp: In function 'void encode_extended_status_dib_reply_packet(device)':
src/SmartportSD.cpp:1332:36: warning: right shift count >= width of type [-Wshift-count-overflow]
   packet_buffer[18] = (d.blocks >> 16 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                                    ^~
src/SmartportSD.cpp:1332:41: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   packet_buffer[18] = (d.blocks >> 16 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                       ~~~~~~~~~~~~~~~~~~^~~~~~
src/SmartportSD.cpp:1333:36: warning: right shift count >= width of type [-Wshift-count-overflow]
   packet_buffer[19] = (d.blocks >> 24 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                                    ^~
src/SmartportSD.cpp:1333:41: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   packet_buffer[19] = (d.blocks >> 24 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                       ~~~~~~~~~~~~~~~~~~^~~~~~
src/SmartportSD.cpp:1335:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[21] = 'Sm';  //ID string (16 chars total)
                       ^~~~
src/SmartportSD.cpp:1337:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[24] = 'artport';
                       ^~~~~~~~~
src/SmartportSD.cpp:1339:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[32] = ' SD    ';
                       ^~~~~~~~~
src/SmartportSD.cpp: In function 'void print_packet(unsigned char*, int)':
src/SmartportSD.cpp:1417:8: warning: variable 'xx' set but not used [-Wunused-but-set-variable]
   char xx;
        ^~
src/SmartportSD.cpp: In function 'int rotate_boot()':
src/SmartportSD.cpp:1531:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatName.cpp.o
src/src/SmartportSD.cpp: In function 'void loop()':
src/src/SmartportSD.cpp:577:98: warning: left shift count >= width of type [-Wshift-count-overflow]
                 block_num = block_num + (((LBT & 0x7f) | (((unsigned short)LBH << 5) & 0x80)) << 16);
                                                                                                  ^~
src/src/SmartportSD.cpp:249:37: warning: unused variable 'LBX' [-Wunused-variable]
   unsigned char LBH, LBL, LBN, LBT, LBX;
                                     ^~~
src/src/SmartportSD.cpp: In function 'uint8_t decode_data_packet()':
src/src/SmartportSD.cpp:911:48: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
     packet_buffer[i] = ((packet_buffer[13] << i+1) & 0x80) | (packet_buffer[14+i] & 0x7f);
                                               ~^~
src/src/SmartportSD.cpp: In function 'void encode_status_reply_packet(device)':
src/src/SmartportSD.cpp:1047:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff;
                          ^~
src/src/SmartportSD.cpp: In function 'void encode_extended_status_reply_packet(device)':
src/src/SmartportSD.cpp:1117:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff;
                          ^~
src/src/SmartportSD.cpp:1118:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[4] = (d.blocks >> 24 ) & 0xff;
                          ^~
src/src/SmartportSD.cpp: In function 'void encode_status_dib_reply_packet(device)':
src/src/SmartportSD.cpp:1213:26: warning: right shift count >= width of type [-Wshift-count-overflow]
   data[3] = (d.blocks >> 16 ) & 0xff ; //block size 3
                          ^~
src/src/SmartportSD.cpp: In function 'void encode_extended_status_dib_reply_packet(device)':
src/src/SmartportSD.cpp:1332:36: warning: right shift count >= width of type [-Wshift-count-overflow]
   packet_buffer[18] = (d.blocks >> 16 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                                    ^~
src/src/SmartportSD.cpp:1332:41: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   packet_buffer[18] = (d.blocks >> 16 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                       ~~~~~~~~~~~~~~~~~~^~~~~~
src/src/SmartportSD.cpp:1333:36: warning: right shift count >= width of type [-Wshift-count-overflow]
   packet_buffer[19] = (d.blocks >> 24 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                                    ^~
src/src/SmartportSD.cpp:1333:41: warning: suggest parentheses around arithmetic in operand of '|' [-Wparentheses]
   packet_buffer[19] = (d.blocks >> 24 ) & 0xff | 0x80 ; //block size 3 - why is the high bit set?
                       ~~~~~~~~~~~~~~~~~~^~~~~~
src/src/SmartportSD.cpp:1335:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[21] = 'Sm';  //ID string (16 chars total)
                       ^~~~
src/src/SmartportSD.cpp:1337:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[24] = 'artport';
                       ^~~~~~~~~
src/src/SmartportSD.cpp:1339:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
   packet_buffer[32] = ' SD    ';
                       ^~~~~~~~~
src/src/SmartportSD.cpp: In function 'void print_packet(unsigned char*, int)':
src/src/SmartportSD.cpp:1417:8: warning: variable 'xx' set but not used [-Wunused-but-set-variable]
   char xx;
        ^~
src/src/SmartportSD.cpp: In function 'int rotate_boot()':
src/src/SmartportSD.cpp:1531:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
src/SmartportSD.cpp: In function 'encode_status_dib_reply_packet(device)':
src/SmartportSD.cpp:1251:22: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]
       group_buffer[i]=data[i + oddnum + (grpcount * 7)];
       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/SmartportSD.cpp:1250:15: note: within this loop
     for (i=0;i<8;i++) {
              ~^~
src/src/SmartportSD.cpp: In function 'encode_status_dib_reply_packet(device)':
src/src/SmartportSD.cpp:1251:22: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]
       group_buffer[i]=data[i + oddnum + (grpcount * 7)];
       ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/src/SmartportSD.cpp:1250:15: note: within this loop
     for (i=0;i<8;i++) {
              ~^~
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatPartition.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/ExFatLib/ExFatVolume.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatDbg.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatFile.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatFileLFN.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatFilePrint.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatFileSFN.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatFormatter.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatName.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatPartition.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FatLib/FatVolume.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FreeStack.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FsLib/FsFile.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FsLib/FsNew.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/FsLib/FsVolume.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/MinimumSerial.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SdCard/Rp2040Sdio/PioSdioCard.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SdCard/SdCardInfo.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SdCard/SdSpiCard.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SdCard/TeensySdio/TeensySdio.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiArtemis.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiChipSelect.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiDue.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiParticle.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiSTM32.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiSTM32Core.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/SpiDriver/SdSpiTeensy3.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FmtNumber.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FsCache.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FsDateTime.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FsName.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FsStructs.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/FsUtf.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/PrintBasic.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/common/upcase.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/iostream/StdioStream.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/iostream/StreamBaseClass.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/iostream/istream.cpp.o
Compiling .pio/build/nanoatmega328/lib09e/SdFat - Adafruit Fork/iostream/ostream.cpp.o
Archiving .pio/build/nanoatmega328/libFrameworkArduinoVariant.a
Compiling .pio/build/nanoatmega328/FrameworkArduino/CDC.cpp.o
Indexing .pio/build/nanoatmega328/libFrameworkArduinoVariant.a
Compiling .pio/build/nanoatmega328/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/HardwareSerial0.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/HardwareSerial1.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/HardwareSerial2.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/HardwareSerial3.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/IPAddress.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/PluggableUSB.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/Print.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/Stream.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/Tone.cpp.o
Archiving .pio/build/nanoatmega328/lib09e/libSdFat - Adafruit Fork.a
Compiling .pio/build/nanoatmega328/FrameworkArduino/USBCore.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/WInterrupts.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/WMath.cpp.o
Indexing .pio/build/nanoatmega328/lib09e/libSdFat - Adafruit Fork.a
Compiling .pio/build/nanoatmega328/FrameworkArduino/WString.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/abi.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/hooks.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/main.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/new.cpp.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring_analog.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring_digital.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring_pulse.S.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring_pulse.c.o
Compiling .pio/build/nanoatmega328/FrameworkArduino/wiring_shift.c.o
Archiving .pio/build/nanoatmega328/libFrameworkArduino.a
Indexing .pio/build/nanoatmega328/libFrameworkArduino.a
Linking .pio/build/nanoatmega328/firmware.elf
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_data_packet(unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `count'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `packet_buffer'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_extended_data_packet(unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `decode_data_packet()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_write_status_packet(unsigned char, unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_init_reply_packet(unsigned char, unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_status_reply_packet(device)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_extended_status_reply_packet(device)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_error_reply_packet(unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_status_dib_reply_packet(device)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `encode_extended_status_dib_reply_packet(device)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `print_packet(unsigned char*, int)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `packet_length()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `verify_cmdpkt_checksum()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `rotate_boot()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `initPartition'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `devices'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `partition_led_pins'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `loop'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `state'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `partition'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `led_err()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `mcuInit()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `freeMemory()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `is_ours(unsigned char)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `open_image(device&, String)'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `sdcard'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `print_hd_info()'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `setup'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `packet_byte'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio/build/nanoatmega328/src/src/SmartportSD.cpp.o (symbol from plugin): In function `encode_data_packet(unsigned char)':
(.text+0x0): multiple definition of `status'
.pio/build/nanoatmega328/src/SmartportSD.cpp.o (symbol from plugin):(.text+0x0): first defined here
/Users/userid/.platformio/packages/framework-arduino-avr/cores/arduino/main.cpp: In function 'main':
src/SmartportSD.cpp:1251:22: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations]
       group_buffer[i]=data[i + oddnum + (grpcount * 7)];
                      ^
src/SmartportSD.cpp:1250:15: note: within this loop
     for (i=0;i<8;i++) {
               ^
collect2: error: ld returned 1 exit status
*** [.pio/build/nanoatmega328/firmware.elf] Error 1
===========================

I'm really walking here blindfolded in dark and I have no idea what I'm doing :-(
I just wanted to have a nice little project to attach to my IIc.
 

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
Thanks @Stinkerton18 for your help.

I have now installed both vscode and platformio, along with library adafruit/sdfat. I did also with Greimans original(?) library, but that produced even more errors.

Now when building the project I get
Code:
Processing nanoatmega328 (platform: atmelavr; board: nanoatmega328new; framework: arduino)
--------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/nanoatmega328new.html
PLATFORM: Atmel AVR (5.1.0) > Arduino Nano ATmega328 (New Bootloader)
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 30KB Flash
DEBUG: Current (avr-stub) External (avr-stub, simavr)
PACKAGES:
 - framework-arduino-avr @ 5.2.0
 - toolchain-atmelavr @ 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 6 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SdFat - Adafruit Fork @ 2.3.54
Building in release mode

I'm really walking here blindfolded in dark and I have no idea what I'm doing :-(
I just wanted to have a nice little project to attach to my IIc.
It looks like you have the newest SDFat library version. How I know is this line from your logs:
|-- SdFat - Adafruit Fork @ 2.3.54

EDIT:
The oldest available now is 1.5.1 though from the looks of things, which is much newer than what Eric was using originally:
1758558961099.png


I'll try back leveling to this release and see if the code compiles.
 
Last edited:

Stinkerton18

Moderator
Staff member
Aug 18, 2022
86
71
18
Alright, test done, compiled without incident and PlatformIO/VSCode downloaded the appropriate version of the greiman (not AdaFruit) SdFat library.

I did the following:
  1. Installed VS Code from this link: https://code.visualstudio.com/
  2. Installed Platform IO per their instructions here: https://platformio.org/install/ide?install=vscode
  3. Waited for Platform IO to finish its install, though I had to manually install python3-venv myself.
  4. Cloned Eric's github repo to a folder on my computer (you need the entire repo)
  5. Opened the smartportsd folder in VS Code (File -> Open Folder)
  6. In the "Explorer" window in VS Code, clicked on the platformio.ini file to open it and have VS Code/PlatformIO start the download and setup of the necessary files:
1758559883682.png


It was, surprisingly simple in my case, especially since this was on a Mint Linux machine. The only manual step I had to take was installing python3-venv.

Did you clone the entire repo from Eric or are you still trying to use the older/original repo?