{"id":19065413,"url":"https://github.com/newaetech/newae-mcuboot-demo","last_synced_at":"2025-06-30T23:03:11.988Z","repository":{"id":84256213,"uuid":"223003003","full_name":"newaetech/newae-mcuboot-demo","owner":"newaetech","description":"Bootloader that uses Chip Armor ","archived":false,"fork":false,"pushed_at":"2020-02-25T22:31:27.000Z","size":247,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-30T23:02:53.431Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/newaetech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-20T18:37:19.000Z","updated_at":"2021-07-02T11:19:38.000Z","dependencies_parsed_at":"2023-05-24T03:45:33.557Z","dependency_job_id":null,"html_url":"https://github.com/newaetech/newae-mcuboot-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/newaetech/newae-mcuboot-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fnewae-mcuboot-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fnewae-mcuboot-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fnewae-mcuboot-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fnewae-mcuboot-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/newaetech","download_url":"https://codeload.github.com/newaetech/newae-mcuboot-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/newaetech%2Fnewae-mcuboot-demo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262863687,"owners_count":23376452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T00:49:50.644Z","updated_at":"2025-06-30T23:03:11.973Z","avatar_url":"https://github.com/newaetech.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NewAE Secure Bootloader\nThis project was ported over from Trusted Firmware-M and adapted to run on the STM32F303RCT7\n\nIt can only support 2 slots (Application Running/Application to Run)\n\nRSA 2048 is validated to be working (A single bit change will prevent application from running)\n\n## Getting Started\nThis project is only validated for use on the STM32F303RCT7. Due to the limited memory the max App size that can be programmed is limited\nto 64k\n\nThis project is based off of three main sources\n-Trusted Firmware-M (tf-m) for base loader.c and support modules [tfm](https://git.trustedfirmware.org/trusted-firmware-m.git)\n-ChipWhisperer for base hardware platform and python programming [cw](https://github.com/newaetech/chipwhisperer)\n-Juul image signing tool as tf-m had features the STM32F303 could not support (Secure/Non-Secure partitions) [mcuboot](https://github.com/JuulLabs-OSS/mcuboot)\n\nIn future developments NewAE's Chip Armour will be used to demonstrate how a complex bootloader can be secured.\n\n# Operation\n\nThe bootloader sits at the base flash address. In the demo App A will be programming where the bootloader will jump too. App B is the app that\nwill be swapped over to the starting jump address (Marked by the --pad parameter with the signing tool). It will verify the signature generated with \nthe .pem file and if valid, swap B over and start it.\n\n## GIT Source\nNote all development occurs on here [trunk](https://github.com/newaetech/ca_bootloader) and [branch](https://github.com/newaetech/chipwhisperer/tree/CW_CA_BL)\n\n## Running\nTo make and run the demo simply run\n\n##  Windows:\n..\\ca_bootloader\\Scripts\\demo_build_bootloader_and_apps.bat\n\n## Linux\n..\\ca_bootloader\\Scripts\\demo_build_bootloader_and_apps.sh\n\n\n# Development Notes\n\nEach application has only 64KB space allocated for it.\nThe app to be loaded must use the same starting ROM addresses. The offset in programming is handled with firmware_loader.py \n\nIf you wish to modify the bootloader it must not exceed address space 0x08008000 after programming. Heavy optimization is recommended\n\nThe primary base of the firmware is handled in the chipwhisperer libraries. If you want to port to a different micro flash_layout.h and Driver_Flash.c are the primary\nstarting points.\n\n##  Python Scripts\n\nFirmwareLoader\\firmware_loader.py can be used to automatically program the applications at the correct offsets. Default paths will be used unless specified otherwise.\n\n##  Linker Script Notes\n\nNote: The addresses in the example are only gaurenteed to work for the STM32F303RCT7\n\nBootloader: Starting address 0x08000000\nApp A: Starting address 0x08008000\nApp B: Starting address 0x08008000 ***NOTE*** When programming it, it must be offset by 0x10000 (see firmware_loader.py)\n\n## Header Allocation\n\nFor the signing tool to work header space must be allocated in your application.\n\nExample in linkerscript:\n  .header :\n  {\n    . = ALIGN(4);\n    KEEP(*(.header))\n    . = 0x400;\n  } \u003e ROM\n\nIn main_A.c:\n\nvolatile char __attribute__((section(\".header\"))) image_header[0x400];\n\n# Customizing \n\nThere are certain features that will require manual configuration if custom keys wish to be used.\n\nThe keys.c file used was generated with the following:\nhttps://juullabs-oss.github.io/mcuboot/encrypted_images.html\n\nThe applications were signed using imgtool:\nhttps://juullabs-oss.github.io/mcuboot/imgtool.html\n\n---\n\nChipWhisperer is a trademark of NewAE Technology Inc., registered in the US, Europe, and China.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fnewae-mcuboot-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnewaetech%2Fnewae-mcuboot-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnewaetech%2Fnewae-mcuboot-demo/lists"}