Main Site Documentation

STM32F746 device not working with 1.0.0.0 previews


#1

Hi @Dat_Tran, I’m not able to let run my F746 devices with TinyCLR since first 1.0.0.0 preview (1,2 & 3)
I found that in the main.cpp the call:

TARGET(_Startup_GetRunApp)(runApp); 
TinyCLR_Startup_Start(&OnSoftReset, runApp);

It seems that call to TinyCLR_Startup_Start() fail or exit as soon called, so the device just lockup returning from main.
Is it a problem in the lib for cortex-m7? Other device (769/767) are working fine.
I double checked .ldf file but with no luck…


#2

Can I see your ldf file?


#3

Here it is… This works fine with TinyCLR V0.12.0

ENTRY(EntryPoint)
MEMORY
{
	IRAM (rw) : ORIGIN = 0x20000000, LENGTH = 0x50000 /* end: 0x2004FFFF */
	LR_FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024k 
	SDRAM (rwx) : ORIGIN = 0x60000000, LENGTH = 16m /* 0x800000 */
}
SECTIONS
{
	ER_FLASH 0x08000000 :
	{
		* (i.EntryPoint)
		* (SectionForBootstrapOperations)
		* (SectionForFlashOperations)
		* (.text*)
		* (i.*)
		* (.rodata*)
		* (rodata)
		* (.constdata*)
		* (.conststring*)
		* (.glue*)
		* (tinyclr_metadata)
		* (SectionForCode*)
		PROVIDE(_sbrk = .);
		PROVIDE(_write = .);
		PROVIDE(_close = .);
		PROVIDE(_fstat = .);
		PROVIDE(_lseek = .);
		PROVIDE(_read = .);
		PROVIDE(_exit = .);
		PROVIDE(_getpid = .);
		PROVIDE(_kill = .);
		PROVIDE(abort = .);
		PROVIDE(__errno = .);
		PROVIDE(_read = .);
		PROVIDE(isatty = .);
		PROVIDE(_isatty = .);
	}>LR_FLASH

	ER_VECTORS 0x20000000 :
	{
		* (VectorTable)
	}>IRAM

	ER_RAM_RW 0x20000200 : ALIGN(0x08)
	{
		* (rwdata)
		* (.data*)
	}>IRAM AT>LR_FLASH

	.bss (NOLOAD) : ALIGN(0x08)
	{
		* (.bss*)
		* (.zidata*)
		PROVIDE(__exidx_start = .);
		PROVIDE(__exidx_end = .);
		* (COMMON)
	}>IRAM

	ER_RAM_RO  : ALIGN(0x08)
	{

	}>IRAM AT>LR_FLASH

	/DISCARD/  :
	{
		* (.ARM.exidx*)
		* (.ARM.extab*)
	}

	/************************NORMAL HEAP ALLOCATION in MCU SRAM***************************
	ER_HEAP_BEGIN 0x20009000 :
	{
		* (SectionForHeapBegin)
	}>IRAM

	
	ER_HEAP_END 0x2004A000 - 0x08 :
	{
		* (SectionForHeapEnd)
	}>IRAM
	************************************************************************************/
		
	/***********************External SDRAM Allocation ***********************************/
	ER_HEAP_BEGIN 0x60000000 :
	{
		* (SectionForHeapBegin)
	}>SDRAM

	
	ER_HEAP_END 0x60800000 - 0x08 :
	{
		* (SectionForHeapEnd)
	}>SDRAM
	/*************************************************************************************/

	ER_RLP_BEGIN 0x2004A000 :
	{
		* (SectionForRlpBegin)
	}>IRAM

	ER_RLP_END 0x2004C000 - 0x08 :
	{
		* (SectionForRlpEnd)
	}>IRAM

	/* STACK POINTER */
	ER_STACK_BOTTOM 0x2004C000 :
	{
		* (SectionForStackBottom)
	}>IRAM

	ER_STACK_TOP 0x20050000 - 0x08 :
	{
		* (SectionForStackTop +LAST)
	}>IRAM

}
Load$$ER_FLASH$$Base = LOADADDR(ER_FLASH);
Image$$ER_FLASH$$Length = SIZEOF(ER_FLASH);
Image$$ER_RAM_RO$$Base = ADDR(ER_RAM_RO);
Image$$ER_RAM_RO$$Length = SIZEOF(ER_RAM_RO);
Load$$ER_RAM_RO$$Base = LOADADDR(ER_RAM_RO);
Image$$ER_RAM_RW$$Base = ADDR(ER_RAM_RW);
Image$$ER_RAM_RW$$Length = SIZEOF(ER_RAM_RW);
Load$$ER_RAM_RW$$Base = LOADADDR(ER_RAM_RW);
Image$$ER_RAM_RW$$ZI$$Base = ADDR(.bss);
Image$$ER_RAM_RW$$ZI$$Length = SIZEOF(.bss);
Load$$ER_RLP$$Base = LOADADDR(ER_RLP_BEGIN);
Image$$ER_RLP$$Length = LOADADDR(ER_RLP_END) - LOADADDR(ER_RLP_BEGIN);
__use_no_semihosting_swi = 0;

#4

Can you try to switch heap into internal SRAM to see what happen?


#5

@Dat_Tran thank you. I’ve tested both memory type (internal SRAM or ext SDRAM) but no difference. Same problem.
After some more tests I found that

TinyCLR_Startup_Start(&OnSoftReset, runApp);

is called and lockup inside the function, but OnSoftReset() is never called.


#6

And what latest version that worked on that devices? I can check if any different, is it Prew0.12.0?


#7

Yes on 0.12.0 it works fine. I’ve flashed again 0.12 firmware and it works fine both with sram and with sdram, hs and fs usb

EDIT: I’m going to think that there’s something not correct for F746 in the STM32F7_Deployment…