Platform not found error using custom board

I am trying to build a project that uses an arduino Due board, but memory is separated in a “low” and “high” section. When i try to build the project i get this error from a platformio file:

File "/opt/homebrew/lib/python3.9/site-packages/platformio/platform/base.py", line 196, in configure_default_packages
    self.packages[_pkg_name]["optional"] = False
KeyError: 'framework-arduino-sam-sam'

Of course, there is no framework-arduino-sam-sam

This is the .json file were i define the “low” part of the board

{
  "build": {
    "core": "sam",
    "cpu": "cortex-m3",
    "extra_flags": "-D__SAM3X8E__ -DARDUINO_ARCH_SAM -DARDUINO_SAM_DUE",
    "f_cpu": "84000000L",
    "hwids": [
      [
        "0x2341",
        "0x003E"
      ],
      [
        "0x2341",
        "0x003D"
      ],
      [
        "0x2A03",
        "0x003D"
      ]
    ],
    "ldscript": "flash_low.ld",
    "mcu": "at91sam3x8e",
    "usb_product": "Arduino Due",
    "variant": "arduino_due_x"
  },
  "connectivity": [
    "can"
  ],
  "debug": {
    "jlink_device": "ATSAM3X8E",
    "openocd_chipname": "at91sam3X8E",
    "openocd_target": "at91sam3XXX",
    "svd_path": "ATSAM3X8E.svd"
  },
  "frameworks": [
    "arduino",
    "simba"
  ],
  "name": "Arduino Due (Low Bootloader)",
  "upload": {
    "disable_flushing": true,
    "maximum_ram_size": 98304,
    "maximum_size": 524288,
    "native_usb": false,
    "protocol": "sam-ba",
    "protocols": [
      "sam-ba",
      "jlink",
      "blackmagic",
      "atmel-ice",
      "stlink"
    ],
    "require_upload_port": true,
    "use_1200bps_touch": true,
    "wait_for_upload_port": false
  },
  "url": "https://www.arduino.cc/en/Main/ArduinoBoardDue",
  "vendor": "Arduino"
}

Is there a formatting issue that i am missing?

This value is used to determine what framework package is used.

According to PlatformIO Registry there is no framework-arduino-sam-sam. For the standard core, the board definition of the Due chooses

1 Like

Yes, i suspected that but i did not understad how the .json was used so i prefered to ask. Now it works

Thank you!