1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

fastflash: Link bootloader that runs from RAM

This commit is contained in:
Saleem Rashid 2017-06-10 19:40:38 +01:00 committed by Pavol Rusnak
parent 80d17c1333
commit e74f9d8730
5 changed files with 52 additions and 0 deletions

13
fastflash/Makefile Normal file
View File

@ -0,0 +1,13 @@
APPVER = fastflash
NAME = bootloader
OBJS += bootloader.o
OBJS += signatures.o
OBJS += usb.o
OBJS += ../vendor/trezor-crypto/sha2.o
include ../Makefile.include
CFLAGS += -I../bootloader

1
fastflash/bootloader.c Symbolic link
View File

@ -0,0 +1 @@
../bootloader/bootloader.c

28
fastflash/signatures.c Normal file
View File

@ -0,0 +1,28 @@
/*
* This file is part of the TREZOR project.
*
* Copyright (C) 2017 Saleem Rashid <trezor@saleemrashid.com>
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdbool.h>
#include <stdint.h>
int signatures_ok(uint8_t *store_hash)
{
(void) store_hash;
return false;
}

1
fastflash/usb.c Symbolic link
View File

@ -0,0 +1 @@
../bootloader/usb.c

9
memory_app_fastflash.ld Normal file
View File

@ -0,0 +1,9 @@
/* STM32F205RE - 512K Flash, 128K RAM */
MEMORY
{
rom (rx) : ORIGIN = 0x20000000, LENGTH = 20K
ram (rwx) : ORIGIN = ORIGIN(rom) + LENGTH(rom),
LENGTH = 128K - LENGTH(rom)
}
INCLUDE libopencm3_stm32f2.ld