notronrj
(Jim Norton)
April 21, 2021, 11:42pm
1
On an NXP RT1050 EVKB using CMSIS/DAP to debug a simple program, it appears that the debugger is having a hard time correctly displaying the value of an array of uint_8. I’ve attached an image of the debug session.
Unless I’m missing something it seems like Variables->Local displaying mac shouldn’t be showing the array as being filled with 0x00. And the gdb console even believes the values in the mac array are 0x00.
Am I doing something wrong or is this a bug in mbed studio?
notronrj
(Jim Norton)
April 23, 2021, 11:39pm
2
Are these forums dead?
Not even a “Your an idiot for posting such a stupid question” reply?
hudakz
(Zoltan Hudak)
April 24, 2021, 7:45am
3
Hello Jim,
Mbed build profiles are located in the mbed-os/tools/profiles
directory. You can change Mbed’s default debug profile by modifying the debug.json
file.
Mbed Studio ships with the Arm Compiler 6 and the default debug optimization level is "-O1"
. To get more debug info change it to "-O0"
in the “ARMC6” section.
If you’d like to compile with GCC ARM then have a look at Switching to GCC - Installing | Mbed Studio Documentation . I that case change the optimization level from "-Og"
to "O0"
in the “GCC_ARM” section.
JojoS
(Johannes Stratmann)
April 24, 2021, 10:34am
4
better than modifying the original mbed repo is to use a modified copy and to supply it by the --profile switch.
I have used this with the mbed-cli, hopefully its possible also with Mbed Studio.
There is also a pending PR for changing -O1 to -O0:
ARMmbed:master
← rotu:o0debug
opened 11:52PM - 19 Apr 21 UTC
### Summary of changes
Make Debug profile use optimization level `-O0` inste… ad of `-O1`.
#### Impact of changes
Previously variables in scope could have been optimized out in Mbed Studio when building with the Debug profile.
Now their values should remain visible.
#### Migration actions required
<!--
This should only be applicable in Major PR types for which this field is MANDATORY.
NOTE: This section is automatically written to release notes for Feature and
Major releases and should contain enough details for a user.
-->
### Documentation
None
----------------------------------------------------------------------------------------------------------------
### Pull request type
[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)
----------------------------------------------------------------------------------------------------------------
### Test results
<!--
Provide all the information required, listing all the testing performed. For new targets please attach full test results for all supported compilers.
-->
[] No Tests required for this change (E.g docs only update)
[X] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR
----------------------------------------------------------------------------------------------------------------
### Reviewers
<!--
Request additional reviewers with @username or @team
-->
----------------------------------------------------------------------------------------------------------------
It looks like you are tracing the set_mac_address(), there was already a thread in this forum that it did not work with KL66F target. I have tried this also on a STM32, but it also did not work there. I have opened an issue for this and tried already to fix the problem, but the code is very obscure and no fun to trace.
opened 04:08PM - 19 Mar 21 UTC
closed 01:36PM - 08 Jul 21 UTC
devices: st
priority: untriaged
<!--
************************************** WARNING **********************… ****************
The ciarcom bot parses this header automatically. Any deviation from the
template may cause the bot to automatically correct this header or may result in a
warning message, requesting updates.
Please ensure all sections of the template below are filled in and no changes
are made to the template format. Only bugs should be raised here as issues.
Questions or enhancements should instead be raised on our forums:
https://forums.mbed.com/ .
*************************************************************************************
-->
### Description of defect
<!--
Add detailed description of what you are reporting.
Good example: https://os.mbed.com/docs/mbed-os/latest/contributing/workflow.html
-->
calling set_mac_address() for STM32 targets returns NSAPI_ERROR_UNSUPPORTED, so it is not implemented.
The HAL supports setting a MAC address by ETH_MACAddressConfig().
Was there a reason for not implementing this function or are the drivers not ready for this?
Is there a schedule for adding this function? Otherwise I would try to make a PR when I get it working.
Setting the MAC is important for custom boards to companies MAC ranges.
#### Target(s) affected by this defect ?
STM32, tested with Nucleo STM32F46ZG
#### Toolchain(s) (name and version) displaying this defect ?
gcc 9.x
#### What version of Mbed-os are you using (tag or sha) ?
<!--
For a released version please provide the release tag (this can be found as per the instructions below)
mbed-os version can be found in /platform/mbed_version.h. The tag can be reconstructed as follows:
mbed-os-MBED_MAJOR_VERSION.MBED_MINOR_VERSION.MBED_PATCH_VERSION
Master branch is indicated by 'mbed-os-99.99.99
For an issue found on Master please provide the sha being used.
-->
mbed-os-6.9.0
#### What version(s) of tools are you using. List all that apply (E.g. mbed-cli)
mbed-cli
#### How is this defect reproduced ?
call eth.set_mac_address(myMAC, sizeof(myMAC); before net.connect();
notronrj
(Jim Norton)
April 25, 2021, 2:20am
5
Thank you for that information. I appreciate it much.
notronrj
(Jim Norton)
April 25, 2021, 2:23am
6
Thank you! I appreciate it.
notronrj
(Jim Norton)
April 27, 2021, 7:59pm
7
@JojoS @hudakz
Thanks again. Now I’ve changed the optimization level as you both suggested. However, now when I debug the program I see that GDB complains while loading the code:
warning:
Loadable section "RW_m_data" outside of ELF segments
warning:
Loadable section "RW_m_ncache" outside of ELF segments
done.
And when the program runs it doesn’t work as expected. It seems to get only part way through execution and then seems to do nothing.
Is this an indication that with -g O0 the code is too large to fit into memory?
My board is an NXP RT1050 EVKB which has 512KB internal RAM, 96KB ROM and external flash and RAM 512Mb Flash and 256Mb SDRAM.
My application is very small… it really only does some simple ethernet reads and writes to a website.
hudakz
(Zoltan Hudak)
April 28, 2021, 7:28am
8
If you compile with the Arm Compiler 6 the memory configuration is defined in the :
mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/device/TOOLCHAIN_ARM_STD/MIMXRT1052xxxxx.sct
linker specification file.
In case of GCC ARM it’s in the
mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/device/TOOLCHAIN_GCC_ARM/MIMXRT1052xxxxx.ld
Here you can find the location and size of these SRAM memories:
#define m_data_start 0x80000000
#define m_data_size 0x01E00000
#define m_ncache_start 0x81E00000
#define m_ncache_size 0x00200000
Is this an indication that with -g O0 the code is too large to fit into memory?
Even if your program (code) is small and fits into the flash memory it can use a large amount of SRAM. For example, if you define large buffers/arrays. So it’s indication that your code uses more SRAM than can fit into the SRAM rather than the code is too large to fit into the flash memory.
notronrj
(Jim Norton)
April 28, 2021, 2:59pm
9
Thanks again.
My code uses a single 1k buffer.
It’s surprising that the linker doesn’t complain at link time about not having enough memory.
Shouldn’t it know if .text and .data will be too small?
I appreciate your help once again.
Is it possible in mBED studio to compile just the OS components with a different level of optimization and into a single linkable object so that my application code can be compiled with -g O0 and linked with the OS object file?
I don’t need full debug symbols for the OS components… Only my application code needs it.
hudakz
(Zoltan Hudak)
April 28, 2021, 4:17pm
10
You are absolutely right. The linker should warn you about that. A table showing memory usage is usually displayed at the the end of a successful compilation.
Is it possible in mBED studio to compile just the OS components with a different level of optimization and into a single linkable object so that my application code can be compiled with -g O0 and linked with the OS object file?
I’ve never done it but I think that’s possible:
A static mbed-os
library (libmbed-os.a
) shall be built using the mbed-cli command line interface (Mbed Studion doesn’t have such feature yet). In addition I’m not sure the Arm Compiler 6
is capable to build static libraries so I’d suggest to use the GCC ARM instead. This thread could help.
You can use a mbed_app.json
configuration file to configure the mbed-os
library to your needs. See https://forums.mbed.com/t/static-library-and-mbed-app-json
Create a new project with the Mbed Studio and delete the mbed-os
directory (mbed-os source files) . Copy & paste
the libmbed-os.a
static library file into the root directory of the project and compile with the GCC ARM compiler (see the link in my first post how to switch Mbed Studio to GCC ARM).
1 Like
notronrj
(Jim Norton)
April 28, 2021, 6:34pm
11
@hudakz
The table for the build with no optimization looks like this:
Elf2Bin: transact-sp2
| Module | .text | .data | .bss |
|----------------------|-----------------|-----------|---------------|
| [lib]\c_w.l | 5694(+5694) | 16(+16) | 348(+348) |
| [lib]\fz_wv.l | 26(+26) | 0(+0) | 0(+0) |
| [lib]\libcpp_w.l | 1(+1) | 0(+0) | 0(+0) |
| [lib]\libcppabi_w.l | 44(+44) | 0(+0) | 0(+0) |
| anon$$obj.o | 48(+48) | 0(+0) | 2048(+2048) |
| main.o | 2744(+2744) | 0(+0) | 460(+460) |
| mbed-os\cmsis | 23401(+23401) | 168(+168) | 6609(+6609) |
| mbed-os\connectivity | 127033(+127033) | 299(+299) | 45535(+45535) |
| mbed-os\drivers | 6935(+6935) | 0(+0) | 0(+0) |
| mbed-os\events | 3126(+3126) | 0(+0) | 3104(+3104) |
| mbed-os\hal | 3451(+3451) | 8(+8) | 115(+115) |
| mbed-os\platform | 18971(+18971) | 64(+64) | 1104(+1104) |
| mbed-os\rtos | 3021(+3021) | 0(+0) | 8(+8) |
| mbed-os\targets | 35252(+35252) | 24(+24) | 442(+442) |
| Subtotals | 229747(+229747) | 579(+579) | 59773(+59773) |
Total Static RAM memory (data + bss): 60352(+60352) bytes
Total Flash memory (text + data): 230326(+230326) bytes
58KB for RAM is needed
My board has a processor with 512KB SRAM/TCM internal memory. This SRAM can be shared with TCM and starts at address 0x00.
So I have to figure out how mbed studio has configured this region of memory by looking at the .sct file which I’ll show below.
The board (NXP RT1050 EVKB) has external SDRAM of 256 Mb which is 32MB. So that is plenty of space for the 58KB RAM needed by the application.
~225KB for Flash is needed
The processor (NXP MX RT 1052) has 96 KB ROM starting at address 0x200000
The board has 64MB of HyperFlash. I can’t seem to tell where it is is the memory map.
So it seems to me that if the linker file is setting things up “properly” everything should fit. The .sct file is below if you want to have a look. You might see something I missed.
And the fact that linker isn’t complaining seems to indicate that it was able to fit everything into ROM/Flash/RAM.
The warning message only appear when GDB is loading the image:
warning:
Loadable section "RW_m_data" outside of ELF segments
warning:
Loadable section "RW_m_ncache" outside of ELF segments
done.
I really appreciate you taking the time to help me out. I would be willing to send you some money or something for your time…
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m7
/*
** ###################################################################
** Processors: MIMXRT1052CVJ5B
** MIMXRT1052CVL5B
** MIMXRT1052DVJ6B
** MIMXRT1052DVL6B
**
** Compiler: Keil ARM C/C++ Compiler
** Reference manual: IMXRT1050RM Rev.1, 03/2018
** Version: rev. 1.0, 2018-09-21
** Build: b180921
**
** Abstract:
** Linker file for the Keil ARM C/C++ Compiler
**
** Copyright 2016 Freescale Semiconductor, Inc.
** Copyright 2016-2018 NXP
** All rights reserved.
**
** SPDX-License-Identifier: BSD-3-Clause
**
** http: www.nxp.com
** mail: support@nxp.com
**
** ###################################################################
*/
#define __ram_vector_table__ 1
#if (defined(__ram_vector_table__))
#define __ram_vector_table_size__ 0x00000400
#else
#define __ram_vector_table_size__ 0x00000000
#endif
#if !defined(MBED_APP_START)
#define MBED_APP_START 0x60000000
#endif
#if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE 0x400000
#endif
#if !defined(MBED_APP_COMPILE)
#define m_flash_config_start MBED_APP_START
#define m_flash_config_size 0x00001000
#define m_ivt_start MBED_APP_START + 0x1000
#define m_ivt_size 0x00001000
#define m_interrupts_start MBED_APP_START + 0x2000
#define m_interrupts_size 0x00000400
#define m_text_start MBED_APP_START + 0x2400
#define m_text_size MBED_APP_SIZE - 0x2400
#else
#define m_interrupts_start MBED_APP_START
#define m_interrupts_size 0x00000400
#define m_text_start MBED_APP_START + 0x400
#define m_text_size MBED_APP_SIZE - 0x400
#endif
#define m_text2_start 0x00000000
#define m_text2_size 0x00020000
#define m_data_start 0x80000000
#define m_data_size 0x01E00000
#define m_ncache_start 0x81E00000
#define m_ncache_size 0x00200000
#define m_interrupts_ram_start 0x20000000
#define m_interrupts_ram_size __ram_vector_table_size__
#define m_data2_start (m_interrupts_ram_start + m_interrupts_ram_size)
#define m_data2_size (0x00020000 - m_interrupts_ram_size)
#define m_data3_start 0x20200000
#define m_data3_size 0x00040000
/* Sizes */
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
# if defined(MBED_BOOT_STACK_SIZE)
# define MBED_CONF_TARGET_BOOT_STACK_SIZE MBED_BOOT_STACK_SIZE
# else
# define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
# endif
#endif
#if (defined(__stack_size__))
#define Stack_Size __stack_size__
#else
#define Stack_Size MBED_CONF_TARGET_BOOT_STACK_SIZE
#endif
#if (defined(__heap_size__))
#define Heap_Size __heap_size__
#else
#define Heap_Size 0x0400
#endif
LR_IROM1 MBED_APP_START m_text_start+m_text_size-MBED_APP_START { ; load region size_region
#if !defined(MBED_APP_COMPILE)
RW_m_config_text m_flash_config_start FIXED m_flash_config_size { ; load address = execution address
* (.boot_hdr.conf, +FIRST)
}
RW_m_ivt_text m_ivt_start FIXED m_ivt_size { ; load address = execution address
* (.boot_hdr.ivt, +FIRST)
* (.boot_hdr.boot_data)
* (.boot_hdr.dcd_data)
}
#endif
VECTOR_ROM m_interrupts_start FIXED m_interrupts_size { ; load address = execution address
* (RESET,+FIRST)
}
ER_IROM1 m_text_start FIXED m_text_size { ; load address = execution address
* (InRoot$$Sections)
.ANY (+RO)
}
#if (defined(__ram_vector_table__))
VECTOR_RAM m_interrupts_ram_start EMPTY m_interrupts_ram_size {
}
#else
VECTOR_RAM m_interrupts_start EMPTY 0 {
}
#endif
RW_m_data m_data_start m_data_size { ; RW data
.ANY (+RW +ZI)
*(m_usb_dma_init_data)
*(m_usb_dma_noninit_data)
}
RW_IRAM1 ImageLimit(RW_m_data) {
}
ARM_LIB_HEAP AlignExpr(+0, 16) EMPTY (m_data_start + m_data_size - Stack_Size - AlignExpr(ImageLimit(RW_IRAM1), 16)) {
}
ARM_LIB_STACK m_data_start+m_data_size EMPTY -Stack_Size { ; Stack region growing down
}
RW_m_ram_text m_text2_start m_text2_size {
* (CodeQuickAccess)
}
RW_m_ncache m_ncache_start m_ncache_size { ; ncache RW data
* (NonCacheable.init)
* (*NonCacheable)
}
}
JojoS
(Johannes Stratmann)
April 28, 2021, 7:38pm
12
maybe its a problem with gdb/pyOCD?
opened 04:27AM - 16 Jun 20 UTC
bug
Hi
I'm using mbed studio and when trying to debug on a stm32l4r5zitx with a S… TLink.
I'm getting the following log when trying to debug:
```
Selected port 50000 for debugging
0000297:INFO:board:Target type is stm32l4s5vitx
0000428:INFO:coresight_target:Asserting reset prior to connect
0000581:INFO:dap:DP IDR = 0x2ba01477 (v1 rev2)
0000640:INFO:ap:AP#0 IDR = 0x24770011 (AHB-AP var1 rev2)
0000643:INFO:rom_table:AP#0 ROM table #0 @ 0xe00ff000 (designer=020 part=470)
0000645:INFO:rom_table:[0]
0000646:INFO:rom_table:[1]
0000647:INFO:rom_table:[2]
0000648:INFO:rom_table:[3]
0000649:INFO:rom_table:[4]
0000651:INFO:rom_table:[5]
0000652:INFO:cortex_m:CPU core #0 is Cortex-M4 r0p1
0000657:INFO:dwt:4 hardware watchpoints
0000660:INFO:fpb:6 hardware breakpoints, 4 literal comparators
0000668:INFO:coresight_target:Deasserting reset post connect
0000674:INFO:server:Semihost server started on port 4444
0000675:INFO:gdbserver:GDB server started on port 50000
Reading symbols from c:\Users\User\source\repos\arm-mbed\BUILD\MY_BOARD\ARMC6\arm-mbed.elf...
warning:
**Loadable section "RW_IRAM1" outside of ELF segments**
done.
0000789:INFO:gdbserver:One client connected!
**warning: Loadable section "RW_IRAM1" outside of ELF segments
warning: Overlapping regions in memory map: ignoring**
0x080003d4 in Reset_Handler ()
0000812:INFO:gdbserver:Attempting to load Argon
0000812:INFO:gdbserver:Attempting to load FreeRTOS
0000812:INFO:gdbserver:Attempting to load Zephyr
0000813:INFO:gdbserver:Attempting to load RTX5
0000813:INFO:gdbserver:RTX5 loaded successfully
Attached to debugger on port 50000
Image loaded: c:\Users\User\source\repos\arm-mbed\BUILD\MY_BOARD\ARMC6\arm-mbed.elf
0001809:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries
Traceback (most recent call last):
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 549, in handle_message
reply = handler(msg[msgStart:])
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 776, in v_command
return self.v_cont(cmd)
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 791, in v_cont
if self.is_threading_enabled():
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\gdbserver\gdbserver.py", line 1320, in is_threading_enabled
return (self.thread_provider is not None) and self.thread_provider.is_enabled \
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py", line 408, in is_enabled
return self.get_kernel_state() != 0 and not self._target.in_thread_mode_on_main_stack()
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\rtos\rtx5.py", line 446, in get_kernel_state
return self._target_context.read8(self._os_rtx_info + RTX5ThreadProvider.KERNEL_STATE_OFFSET)
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\core\memory_interface.py", line 64, in read8
return self.read_memory(addr, 8, now)
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py", line 516, in read_memory
return self._memcache.read_memory(addr, transfer_size, now)
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py", line 422, in read_memory
data = self.read_memory_block8(addr, 1)[0]
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py", line 442, in read_memory_block8
if not self._check_regions(addr, size):
File "c:\Users\User\AppData\Local\Mbed Studio\mbed-studio-tools\python\lib\site-packages\pyocd\debug\cache.py", line 414, in _check_regions
raise MemoryAccessError("individual memory accesses must not cross memory region boundaries")
pyocd.debug.cache.MemoryAccessError: individual memory accesses must not cross memory region boundaries
**"0001809:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries"
warning: Remote failure reply: E01**
0001809:ERROR:gdbserver:Unhandled exception in handle_message: individual memory accesses must not cross memory region boundaries
```
Key lines in there are:
warning: **Loadable section "RW_IRAM1" outside of ELF segments** done.
0000789:INFO:gdbserver:One client connected! **warning: Loadable section "RW_IRAM1" outside of ELF segments warning:
In the map file, the RAM looks ok:
Execution Region RW_IRAM1 (Base: 0x200001c0, Size: 0x00002cc8, Max: 0x0009fa40, ABSOLUTE)
Execution Region ARM_LIB_STACK (Base: 0x2009fc00, Size: 0x00000400, Max: 0x00000400, ABSOLUTE)
Processor datasheets say:
> The STM32L4S5xx, STM32L4S7xx and STM32L4S9xx devices feature 640 Kbytes of
> embedded SRAM. This SRAM is split into three blocks:
> • 192 Kbytes mapped at address 0x2000 0000 (SRAM1).
> • 64 Kbytes located at address 0x1000 0000 with hardware parity check (SRAM2).
> This memory is also mapped at address 0x2003 0000 offering a contiguous address
> space with the SRAM1.
> This block is accessed through the ICode/DCode buses for maximum performance.
> These 64 Kbytes SRAM can also be retained in Standby mode.
> The SRAM2 can be write-protected with 1 Kbyte granularity.
> • 384 Kbytes mapped at address 0x2004 0000 - (SRAM3).
So it does sound like memory is 0x2000 0000 - 0x200A 0000 which matches the map file's use of IRAM. So why does pyOCD say the ELF file is wrong?
Thank you.
1 Like
hudakz
(Zoltan Hudak)
April 28, 2021, 8:39pm
13
The 512KB SRAM/TCM memory is not set up and used by the linker file so Mbed doesn’t know about it! The largest portion of contiguous SRAM configures by the linker file has 0x01E00000 bytes (about 30 kBytes).
Which micro-controller is installed on the board (could you give us a link to the datasheet) ?
notronrj
(Jim Norton)
April 28, 2021, 8:46pm
14
hudakz:
The 512KB SRAM/TCM memory is not set up and used by the linker file so Mbed doesn’t know about it! The largest portion of contiguous SRAM configures by the linker file has 0x01E00000 bytes (about 30 kBytes).
Which micro-controller is installed on the board (could you give us a link to the datasheet) ?
Hello, it’s an NXP i.MX RT1052 on an i.MX NXP RT1050 EVKB eval board.
RT1052 Processor Data Sheet
NXP i.MX RT1050 EVKB Eval Board
But even if the linker doesn’t know about the processor internal memory, the board has 32MB of external SDRAM which I believe starts at 0x80000000 with a total memory space of 1.5GB
And the map file seems to indicate it is using external SDRAM: ( this is for a release build so no debug symbols )
0x8000defc 0x000000bc Zero RW 15 .bss.redThread BUILD/MIMXRT1050_EVK/ARMC6/main.o
0x8000dfb8 0x00000040 Zero RW 3435 .bss.rx_buff BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_IMX/imx_emac.o
0x8000dff8 0x00000040 Zero RW 3436 .bss.rx_ptr BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_IMX/imx_emac.o
0x8000e038 0x00000080 Zero RW 30221 .bss.s_EDMAHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_edma.o
0x8000e0b8 0x00000004 Zero RW 30345 .bss.s_ENETHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_enet.o
0x8000e0bc 0x0000000c Zero RW 30446 .bss.s_flexcanHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_flexcan.o
0x8000e0c8 0x00000004 Zero RW 31007 .bss.s_flexspiHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_flexspi.o
0x8000e0cc 0x00000014 Zero RW 31260 .bss.s_lpspiHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_lpspi.o
0x8000e0e0 0x00000024 Zero RW 31395 .bss.s_lpuartHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_lpuart.o
0x8000e104 0x00000020 Zero RW 31776 .bss.s_saiHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_sai.o
0x8000e124 0x0000000c Zero RW 32211 .bss.s_usdhcHandle BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_usdhc.o
0x8000e130 0x00000004 Zero RW 694 .bss.singleton_mutex_id BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/cmsis/device/rtos/source/mbed_rtos_rtx.o
0x8000e134 0x0000001c Zero RW 692 .bss.singleton_mutex_obj BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/cmsis/device/rtos/source/mbed_rtos_rtx.o
0x8000e150 0x00000001 Zero RW 6397 .bss.tcp_timer BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip/src/core/lwip_tcp.o
0x8000e151 0x00000003 PAD
0x8000e154 0x00000048 Zero RW 5811 .bss.tcpip_mbox BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip/src/api/lwip_tcpip.o
0x8000e19c 0x00000001 Zero RW 6513 .bss.tcpip_tcp_timer_active BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip/src/core/lwip_timeouts.o
0x8000e19d 0x00000003 PAD
0x8000e1a0 0x00000004 Zero RW 707 .bss.terminate_hook BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/cmsis/device/rtos/source/mbed_rtx_handlers.o
0x8000e1a4 0x00000288 Zero RW 5589 .bss.thread_pool BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip-sys/arch/lwip_sys_arch.o
0x8000e42c 0x00000004 Zero RW 5588 .bss.thread_pool_index BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip-sys/arch/lwip_sys_arch.o
0x8000e430 0x00000004 Zero RW 6548 .bss.udp_pcbs BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/lwipstack/lwip/src/core/lwip_udp.o
0x8000e434 0x00000001 Zero RW 29474 .bss.us_ticker_inited BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_IMX/us_ticker.o
Execution Region RW_IRAM1 (Base: 0x8000e438, Size: 0x00000000, Max: 0xffffffff, ABSOLUTE)
**** No section assigned to this execution region ****
Execution Region ARM_LIB_HEAP (Base: 0x8000e440, Size: 0x01df17c0, Max: 0x01df17c0, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0x8000e440 0x01df17c0 Zero RW 2 ARM_LIB_HEAP.bss anon$$obj.o
Execution Region ARM_LIB_STACK (Base: 0x81dffc00, Size: 0x00000400, Max: 0x00000400, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0x81dffc00 0x00000400 Zero RW 3 ARM_LIB_STACK.bss anon$$obj.o
Execution Region RW_m_ncache (Base: 0x81e00000, Size: 0x000000c4, Max: 0x00200000, ABSOLUTE)
Base Addr Size Type Attr Idx E Section Name Object
0x81e00000 0x000000c0 Data RW 3438 NonCacheable BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/connectivity/drivers/emac/TARGET_NXP_EMAC/TARGET_IMX/imx_emac.o
0x81e000c0 0x00000004 Data RW 32210 NonCacheable BUILD/MIMXRT1050_EVK/ARMC6/mbed-os/targets/TARGET_NXP/TARGET_MCUXpresso_MCUS/TARGET_MIMXRT1050/drivers/fsl_usdhc.o
Thanks again!
hudakz
(Zoltan Hudak)
April 28, 2021, 9:20pm
15
Unfortunately, access to the datasheet and the other link was denied. However, according to the map file you provided there seems to be a quite large heap section ( 0x01df17c0 bytes = about 30 000 kBytes!). To utilize it try to create as much dynamic objects and arrays as possible by using the new
operator. For example
int *buf = new int(n); // array created on the heap
rather than
int buf[n]; // array created on the static memory section or on the stack
notronrj
(Jim Norton)
April 28, 2021, 9:24pm
16
hudakz:
Unfortunately, access to the datasheet and the other link was denied. However, according to the map file you provided there seems to be a quite large heap section ( 0x01df17c0 bytes = about 30 000 kBytes!). To utilize it try to create as much dynamic objects and arrays as possible by using the new
operator. For example
int *buf = new int(n);
rather than
int buf[n];
I will do that. However, I’m only using a 1024 byte array and a 256 byte array. Seems like that wouldn’t be the problem?
If you want, please try the datasheet links again. They should be available to you now.
Thanks again!
hudakz
(Zoltan Hudak)
April 28, 2021, 9:25pm
17
Now they work OK. I’ll take a look tomorrow.
1 Like
notronrj
(Jim Norton)
April 28, 2021, 9:28pm
18
Thanks I really appreciate it.
notronrj
(Jim Norton)
April 28, 2021, 9:29pm
19
Hello @JojoS . That’s certainly possible. I’ve some issues with pyOCD in the past.
Thank you,
notronrj
(Jim Norton)
April 29, 2021, 2:07pm
20
@hudakz @JojoS
Should I create a new thread now that the problem has changed?