Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 511 Bytes

编译调试技巧.md

File metadata and controls

31 lines (19 loc) · 511 Bytes

编译调试技巧

在keil文件中可以使用#warning来打印编译时语句。例如:

#warning xxxx is not defined

在makefile中打印:

$(warning "the value of LOCAL_PATH is$(TOP_DIRS)")

trezor编译设置

-DCONFIDENTIAL='__attribute__((section("confidential")))' 

SECTIONS
{
	.confidential (NOLOAD) : {
		*(confidential)
		ASSERT ((SIZEOF(.confidential) <= 32K), "Error: Confidential section too big!");
	} >ram

	.header : ALIGN(4) {
		KEEP(*(.header));
	} >rom AT>rom

}