Add NanoX support
- embed shake256 as NanoX bug workarround - replace 'C' by 'C' in PIN Entry - fix the fact cx_hash does not accept any more NULL as output buff - add clang formatterpull/56/head
@ -0,0 +1,119 @@
|
||||
---
|
||||
Language: Cpp
|
||||
# BasedOnStyle: LLVM
|
||||
AccessModifierOffset: -2
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignConsecutiveAssignments: true
|
||||
AlignConsecutiveDeclarations: true
|
||||
#AlignConsecutiveMacros: true
|
||||
AlignEscapedNewlines: Right
|
||||
AlignOperands: true
|
||||
AlignTrailingComments: true
|
||||
#AllowAllArgumentsOnNextLine: false
|
||||
#AllowAllConstructorInitializersOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
#AllowShortLambdasOnASingleLine: None
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: None
|
||||
AlwaysBreakAfterReturnType: None
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: false
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
BraceWrapping:
|
||||
AfterClass: false
|
||||
AfterControlStatement: false
|
||||
AfterEnum: false
|
||||
AfterFunction: false
|
||||
AfterNamespace: false
|
||||
AfterObjCDeclaration: false
|
||||
AfterStruct: false
|
||||
AfterUnion: false
|
||||
AfterExternBlock: false
|
||||
BeforeCatch: false
|
||||
BeforeElse: false
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInheritanceComma: false
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializersBeforeComma: false
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 120
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: true
|
||||
ForEachMacros:
|
||||
- foreach
|
||||
- Q_FOREACH
|
||||
- BOOST_FOREACH
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||
Priority: 3
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IndentCaseLabels: false
|
||||
#IndentPPDirectives: BeforeHash
|
||||
IndentWidth: 2
|
||||
IndentWrappedFunctionNames: true
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: All
|
||||
ObjCBlockIndentWidth: 2
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PenaltyBreakAssignment: 2
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 300
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
RawStringFormats:
|
||||
- Delimiter: pb
|
||||
Language: TextProto
|
||||
BasedOnStyle: google
|
||||
ReflowComments: true
|
||||
SortIncludes: false
|
||||
SortUsingDeclarations: false
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeParens: ControlStatements
|
||||
SpaceInEmptyParentheses: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: false
|
||||
SpacesInContainerLiterals: false
|
||||
SpacesInCStyleCastParentheses: false
|
||||
SpacesInParentheses: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: Cpp11
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
...
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 83 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 83 B |
@ -1,167 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Ledger Blue - Secure firmware
|
||||
* (c) 2016, 2017 Ledger
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* Global chip memory layout and constants
|
||||
*
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
DISCARD (rwx) : ORIGIN = 0xd0000000, LENGTH = 1M
|
||||
|
||||
FLASH (rx) : ORIGIN = 0xc0d00000, LENGTH = 400K
|
||||
SRAM (rwx) : ORIGIN = 0x20001800, LENGTH = 4K
|
||||
}
|
||||
|
||||
PAGE_SIZE = 64;
|
||||
STACK_SIZE = 768;
|
||||
END_STACK = ORIGIN(SRAM) + LENGTH(SRAM);
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
ENTRY(main)
|
||||
|
||||
/****************************************************************/
|
||||
/* This section locates the code in FLASH */
|
||||
/****************************************************************/
|
||||
|
||||
/** put text in Flash memory, VMA will be equal to LMA */
|
||||
.text :
|
||||
{
|
||||
/* provide start code symbol, shall be zero */
|
||||
_text = .;
|
||||
_nvram = .;
|
||||
|
||||
PROVIDE(_setjmp = setjmp); /*thanks clang*/
|
||||
|
||||
/* ensure main is always @ 0xC0D00000 */
|
||||
*(.boot*)
|
||||
|
||||
/* place the other code and rodata defined BUT nvram variables that are displaced in a r/w area */
|
||||
*(.text*)
|
||||
*(.rodata.[^UN]*) /*.data.rel.ro* not here to detect invalid PIC usage */
|
||||
*(.rodata.N[^_]*)
|
||||
|
||||
. = ALIGN(4);
|
||||
|
||||
/* all code placed */
|
||||
_etext = .;
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
|
||||
_nvram_data = .;
|
||||
|
||||
/* NVM data (ex-filesystem) */
|
||||
*(.rodata.USBD_CfgDesc)
|
||||
*(.bss.N_* .rodata.N_* .rodata.USBD_CfgDesc)
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
_install_parameters = .;
|
||||
PROVIDE(N_install_parameters = .);
|
||||
_envram = .;
|
||||
_nvram_data_size = _envram - _nvram_data;
|
||||
|
||||
} > FLASH = 0x00
|
||||
|
||||
.data (NOLOAD):
|
||||
{
|
||||
. = ALIGN(4);
|
||||
|
||||
/**
|
||||
* Place RAM initialized variables
|
||||
*/
|
||||
_data = .;
|
||||
|
||||
*(vtable)
|
||||
*(.data*)
|
||||
|
||||
_edata = .;
|
||||
|
||||
} > DISCARD /*> SRAM AT>FLASH = 0x00 */
|
||||
|
||||
.bss :
|
||||
{
|
||||
/**
|
||||
* Place RAM uninitialized variables
|
||||
*/
|
||||
_bss = .;
|
||||
*(.bss*)
|
||||
_ebss = .;
|
||||
|
||||
|
||||
/**
|
||||
* Reserve stack size
|
||||
*/
|
||||
. = ALIGN(4);
|
||||
app_stack_canary = .;
|
||||
PROVIDE(app_stack_canary = .);
|
||||
. += 4;
|
||||
_stack = .;
|
||||
. = _stack + STACK_SIZE;
|
||||
PROVIDE( _stack_size = STACK_SIZE );
|
||||
PROVIDE( _estack = ABSOLUTE(END_STACK) );
|
||||
|
||||
} > SRAM = 0x00
|
||||
|
||||
/****************************************************************/
|
||||
/* DEBUG */
|
||||
/****************************************************************/
|
||||
|
||||
/* remove the debugging information from the standard libraries */
|
||||
DEBUG (NOLOAD) :
|
||||
{
|
||||
libc.a ( * )
|
||||
libm.a ( * )
|
||||
libgcc.a ( * )
|
||||
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
|
||||
}
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
/* DWARF debug sections.
|
||||
Symbols in the DWARF debugging sections are relative to the beginning
|
||||
of the section so we begin them at 0. */
|
||||
/* DWARF 1 */
|
||||
.debug 0 : { *(.debug) }
|
||||
.line 0 : { *(.line) }
|
||||
/* GNU DWARF 1 extensions */
|
||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||
/* DWARF 1.1 and DWARF 2 */
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
/* DWARF 2 */
|
||||
.debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_frame 0 : { *(.debug_frame) }
|
||||
.debug_str 0 : { *(.debug_str) }
|
||||
.debug_loc 0 : { *(.debug_loc) }
|
||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||
/* SGI/MIPS DWARF 2 extensions */
|
||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||
.debug_typenames 0 : { *(.debug_typenames) }
|
||||
.debug_varnames 0 : { *(.debug_varnames) }
|
||||
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
#include "glyphs.h"
|
||||
unsigned int const C_badge_back_colors[]
|
||||
= {
|
||||
0x00000000,
|
||||
0x00ffffff,
|
||||
};
|
||||
|
||||
unsigned char const C_badge_back_bitmap[] = {
|
||||
0xe0, 0x01, 0xfe, 0xc1, 0xfd, 0x38, 0x7f, 0x06, 0xdf, 0x81, 0xff, 0xc4, 0x7f, 0xf3, 0xff, 0xbc,
|
||||
0x1f, 0xe7, 0xe7, 0xf1, 0x3f, 0xf8, 0x07, 0x78, 0x00, };
|
||||
|
||||
#ifdef OS_IO_SEPROXYHAL
|
||||
#include "os_io_seproxyhal.h"
|
||||
const bagl_icon_details_t C_badge_back = { GLYPH_badge_back_WIDTH, GLYPH_badge_back_HEIGHT, 1, C_badge_back_colors, C_badge_back_bitmap };
|
||||
#endif // OS_IO_SEPROXYHAL
|
||||
#include "glyphs.h"
|
||||
unsigned int const C_icon_dashboard_colors[]
|
||||
= {
|
||||
0x00000000,
|
||||
0x00ffffff,
|
||||
};
|
||||
|
||||
unsigned char const C_icon_dashboard_bitmap[] = {
|
||||
0xe0, 0x01, 0xfe, 0xc1, 0xff, 0x38, 0x70, 0x06, 0xd8, 0x79, 0x7e, 0x9e, 0x9f, 0xe7, 0xe7, 0xb9,
|
||||
0x01, 0xe6, 0xc0, 0xf1, 0x3f, 0xf8, 0x07, 0x78, 0x00, };
|
||||
|
||||
#ifdef OS_IO_SEPROXYHAL
|
||||
#include "os_io_seproxyhal.h"
|
||||
const bagl_icon_details_t C_icon_dashboard = { GLYPH_icon_dashboard_WIDTH, GLYPH_icon_dashboard_HEIGHT, 1, C_icon_dashboard_colors, C_icon_dashboard_bitmap };
|
||||
#endif // OS_IO_SEPROXYHAL
|
@ -1,30 +0,0 @@
|
||||
#ifndef GLYPH_badge_back_BPP
|
||||
#define GLYPH_badge_back_WIDTH 14
|
||||
#define GLYPH_badge_back_HEIGHT 14
|
||||
#define GLYPH_badge_back_BPP 1
|
||||
extern
|
||||
unsigned int const C_badge_back_colors[]
|
||||
;
|
||||
extern
|
||||
unsigned char const C_badge_back_bitmap[];
|
||||
#ifdef OS_IO_SEPROXYHAL
|
||||
#include "os_io_seproxyhal.h"
|
||||
extern
|
||||
const bagl_icon_details_t C_badge_back;
|
||||
#endif // GLYPH_badge_back_BPP
|
||||
#endif // OS_IO_SEPROXYHAL
|
||||
#ifndef GLYPH_icon_dashboard_BPP
|
||||
#define GLYPH_icon_dashboard_WIDTH 14
|
||||
#define GLYPH_icon_dashboard_HEIGHT 14
|
||||
#define GLYPH_icon_dashboard_BPP 1
|
||||
extern
|
||||
unsigned int const C_icon_dashboard_colors[]
|
||||
;
|
||||
extern
|
||||
unsigned char const C_icon_dashboard_bitmap[];
|
||||
#ifdef OS_IO_SEPROXYHAL
|
||||
#include "os_io_seproxyhal.h"
|
||||
extern
|
||||
const bagl_icon_details_t C_icon_dashboard;
|
||||
#endif // GLYPH_icon_dashboard_BPP
|
||||
#endif // OS_IO_SEPROXYHAL
|