Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
increase memory in nano x
Browse files Browse the repository at this point in the history
  • Loading branch information
jleni committed Jun 12, 2021
1 parent ff6ded1 commit 1a3a21a
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ jobs:
cd /home/zondax/project
make SUBSTRATE_PARSER_FULL=1
cp /home/zondax/project/app/pkg/installer_s.sh /home/zondax/project/app/pkg/installer_XL_s.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete $(/home/zondax/project/app/pkg/installer_XL_s.sh version) /home/zondax/project/app/pkg/installer_XL_s.sh
- run: /home/zondax/go/bin/ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} $(/home/zondax/project/app/pkg/installer_XL_s.sh version) /home/zondax/project/app/pkg/installer_XL_s.sh

workflows:
version: 2
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ tests_tools_test: tests_tools_build
cd tests_tools/neon && yarn test

zemu_install: tests_tools_build

test_all:
make zemu_install
# test sr25519
make clean_build && SUBSTRATE_PARSER_FULL=1 SUPPORT_SR25519=1 make buildS
cd tests_zemu && yarn testSR25519
make clean_build && SUBSTRATE_PARSER_FULL=1 make
make zemu_test

2 changes: 1 addition & 1 deletion app/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2019 Zondax GmbH
Copyright 2018-2021 Zondax GmbH

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
1 change: 1 addition & 0 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ OUTPUT_INSTALLER := $(CURDIR)/pkg/installer_s.sh
endif

ifeq ($(TARGET_NAME),TARGET_NANOX)
SCRIPT_LD:=$(CURDIR)/script_x.ld
ICONNAME:=$(CURDIR)/nanox_icon.gif
OUTPUT_ELF ?= $(CURDIR)/output/app_x.elf
OUTPUT_INSTALLER:= $(CURDIR)/pkg/installer_x.sh
Expand Down
2 changes: 1 addition & 1 deletion app/Makefile.version
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ APPVERSION_M=1
# This is the `spec_version` field of `Runtime`
APPVERSION_N=46
# This is the patch version of this release
APPVERSION_P=0
APPVERSION_P=1
175 changes: 175 additions & 0 deletions app/script_x.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
/*******************************************************************************
* Ledger Blue - Secure firmware
* (c) 2016, 2017, 2018, 2019 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 = 0xc0de0000, LENGTH = 400K
DATA (r) : ORIGIN = 0xc0de0000, LENGTH = 400K
SRAM (rwx) : ORIGIN = 0xda7a0000, LENGTH = 30K
}

PAGE_SIZE = 256;
STACK_SIZE = 8192;
END_STACK = ORIGIN(SRAM) + LENGTH(SRAM);

ENTRY(main)

SECTIONS
{

/****************************************************************/
/* 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(_nvram = . + ORIGIN(FLASH));

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)
*(.rodata.[^N]*) /*.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) */
*(.bss.N_* .rodata.N_*)

. = ALIGN(PAGE_SIZE);
_envram_data = .;
/* _nvram_data_size = _envram_data - _nvram_data; */
_install_parameters = .;
PROVIDE(N_install_parameters = .);
_envram = .;
PROVIDE(_envram = . + ORIGIN(FLASH));

} > 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_validation = .;
. = _stack_validation + STACK_SIZE;
_stack = ABSOLUTE(END_STACK) - STACK_SIZE;
PROVIDE( _stack = ABSOLUTE(END_STACK) - STACK_SIZE);
_estack = ABSOLUTE(END_STACK);
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.*)
} > DISCARD

/* 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) }

}

0 comments on commit 1a3a21a

Please sign in to comment.