如何设置PSOC62 最大内存

公告

大中华汽车电子生态圈社区并入开发者社区- 更多资讯点击此

Tip / 登入 to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
LeGu_3671501
Level 2
Level 2
5 replies posted 10 questions asked 5 questions asked

msh >version

\ | /
- RT -     Thread Operating System
/ | \     4.0.2 build Jul 15 2019
2006 - 2019 Copyright by rt-thread team
msh >free
total memory: 32744
used memory : 5276
maximum allocated memory: 5276
msh >

最大内存只能设到 32K,  PsoC62 最大内存能设到多少, 如何设置??

0 点赞
1 解答
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

已经表示使用了最大内存。

PSoC 62 TRM里面定义的memory map如下:

0x08000000 – 0x08048400 SRAM

0x10000000 – 0x10100000 User Flash

0x14000000 – 0x14008000 Working Flash

以RAM的分配为例,0x08000000 – 0x08048400为两个核可用的空间,两个核所分配的空间不能重叠,系统自动分配的默认值是

cm0p: RIGIN = 0x08000000, LENGTH = 0x24000

cm4: ORIGIN = 0x08024000, LENGTH = 0x23800

覆盖了0x08000000 – 0x08047800空间,剩余0x200的空间交给系统另作他用。因为没有多余的空间分配给两个核,但有个可行的办法是,根据两个核所占用的空间大小,在两个核之间调整各自占用的空间,一般来说cm4的所需的空间较大一些,你可以适当减小cm0p的LENGTH,同时相应调整cm4的ORIGIN地址。

flash的调整类似。

在原帖中查看解决方案

0 点赞
3 回复数
LeGu_3671501
Level 2
Level 2
5 replies posted 10 questions asked 5 questions asked

arm-none-eabi-gcc.exe -Wl,--start-group -o E:\Keil_app\UartLow\application\UartLowLevelISR01\UartLowLevelISR01.cydsn\CortexM4\ARM_GCC_541\Debug\UartLowLevelISR01_link.elf .\CortexM4\ARM_GCC_541\Debug\startup_psoc6_01_cm4.o .\CortexM4\ARM_GCC_541\Debug\main_cm4.o .\CortexM4\ARM_GCC_541\Debug\system_psoc6_cm4.o .\CortexM4\ARM_GCC_541\Debug\clock.o .\CortexM4\ARM_GCC_541\Debug\components.o .\CortexM4\ARM_GCC_541\Debug\cpu.o .\CortexM4\ARM_GCC_541\Debug\device.o .\CortexM4\ARM_GCC_541\Debug\idle.o .\CortexM4\ARM_GCC_541\Debug\ipc.o .\CortexM4\ARM_GCC_541\Debug\irq.o .\CortexM4\ARM_GCC_541\Debug\kservice.o .\CortexM4\ARM_GCC_541\Debug\mem.o .\CortexM4\ARM_GCC_541\Debug\memheap.o .\CortexM4\ARM_GCC_541\Debug\mempool.o .\CortexM4\ARM_GCC_541\Debug\object.o .\CortexM4\ARM_GCC_541\Debug\scheduler.o .\CortexM4\ARM_GCC_541\Debug\signal.o .\CortexM4\ARM_GCC_541\Debug\slab.o .\CortexM4\ARM_GCC_541\Debug\thread.o .\CortexM4\ARM_GCC_541\Debug\timer.o .\CortexM4\ARM_GCC_541\Debug\board.o .\CortexM4\ARM_GCC_541\Debug\serial.o .\CortexM4\ARM_GCC_541\Debug\dataqueue.o .\CortexM4\ARM_GCC_541\Debug\completion.o .\CortexM4\ARM_GCC_541\Debug\ringbuffer.o .\CortexM4\ARM_GCC_541\Debug\sbc5_serial.o .\CortexM4\ARM_GCC_541\Debug\cpuport.o .\CortexM4\ARM_GCC_541\Debug\cmd.o .\CortexM4\ARM_GCC_541\Debug\finsh_compiler.o .\CortexM4\ARM_GCC_541\Debug\finsh_error.o .\CortexM4\ARM_GCC_541\Debug\finsh_heap.o .\CortexM4\ARM_GCC_541\Debug\finsh_init.o .\CortexM4\ARM_GCC_541\Debug\finsh_node.o .\CortexM4\ARM_GCC_541\Debug\finsh_ops.o .\CortexM4\ARM_GCC_541\Debug\finsh_parser.o .\CortexM4\ARM_GCC_541\Debug\finsh_token.o .\CortexM4\ARM_GCC_541\Debug\finsh_var.o .\CortexM4\ARM_GCC_541\Debug\finsh_vm.o .\CortexM4\ARM_GCC_541\Debug\msh.o .\CortexM4\ARM_GCC_541\Debug\msh_cmd.o .\CortexM4\ARM_GCC_541\Debug\msh_file.o .\CortexM4\ARM_GCC_541\Debug\shell.o .\CortexM4\ARM_GCC_541\Debug\symbol.o .\CortexM4\ARM_GCC_541\Debug\cyfitter_sysint_cfg.o .\CortexM4\ARM_GCC_541\Debug\cymetadata.o .\CortexM4\ARM_GCC_541\Debug\UART.o .\CortexM4\ARM_GCC_541\Debug\cy_efuse.o .\CortexM4\ARM_GCC_541\Debug\cy_flash.o .\CortexM4\ARM_GCC_541\Debug\cy_gpio.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_drv.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_sema.o .\CortexM4\ARM_GCC_541\Debug\cy_ipc_pipe.o .\CortexM4\ARM_GCC_541\Debug\cy_lvd.o .\CortexM4\ARM_GCC_541\Debug\cy_profile.o .\CortexM4\ARM_GCC_541\Debug\cy_prot.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_common.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_i2c.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_ezi2c.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_spi.o .\CortexM4\ARM_GCC_541\Debug\cy_scb_uart.o .\CortexM4\ARM_GCC_541\Debug\cy_sysanalog.o .\CortexM4\ARM_GCC_541\Debug\cy_sysclk.o .\CortexM4\ARM_GCC_541\Debug\cy_sysint.o .\CortexM4\ARM_GCC_541\Debug\cy_syslib.o .\CortexM4\ARM_GCC_541\Debug\cy_syslib_gcc.o .\CortexM4\ARM_GCC_541\Debug\cy_syspm.o .\CortexM4\ARM_GCC_541\Debug\cy_systick.o .\CortexM4\ARM_GCC_541\Debug\cy_trigmux.o .\CortexM4\ARM_GCC_541\Debug\cy_wdt.o .\CortexM4\ARM_GCC_541\Debug\cy_device.o .\CortexM4\ARM_GCC_541\Debug\context_gcc.o -mcpu=cortex-m4 -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -mthumb -L Generated_Source\PSoC6 -Wl,-Map,.\CortexM4\ARM_GCC_541\Debug/UartLowLevelISR01.map -T cy8c6xx7_cm4_dual.ld -specs=nano.specs -Wl,--gc-sections -g -ffunction-sections -Og -ffat-lto-objects -Wl,--end-group

ERROR: region RAM overflowed with stack

collect2.exe: error: ld returned 1 exit status

The command 'arm-none-eabi-gcc.exe' failed with exit code '1'.

0 点赞

ram               (rwx)   : ORIGIN = 0x08024000, LENGTH = 0x23800

    flash             (rx)    : ORIGIN = 0x10080000, LENGTH = 0x80000

这两个参数如何改,才能使用最大内存??

0 点赞
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

已经表示使用了最大内存。

PSoC 62 TRM里面定义的memory map如下:

0x08000000 – 0x08048400 SRAM

0x10000000 – 0x10100000 User Flash

0x14000000 – 0x14008000 Working Flash

以RAM的分配为例,0x08000000 – 0x08048400为两个核可用的空间,两个核所分配的空间不能重叠,系统自动分配的默认值是

cm0p: RIGIN = 0x08000000, LENGTH = 0x24000

cm4: ORIGIN = 0x08024000, LENGTH = 0x23800

覆盖了0x08000000 – 0x08047800空间,剩余0x200的空间交给系统另作他用。因为没有多余的空间分配给两个核,但有个可行的办法是,根据两个核所占用的空间大小,在两个核之间调整各自占用的空间,一般来说cm4的所需的空间较大一些,你可以适当减小cm0p的LENGTH,同时相应调整cm4的ORIGIN地址。

flash的调整类似。

0 点赞