Hello! I have a network project for c6678. System heap is located in L2SRAM, so there is not much memory for allocation and memory leaks are detected instantly. So, I create a daemon for socket servicing on network start and it works fine for first 7-8 runs and then on 9-th connect to the port when NDK tries to create daemon I get the 'could not alloc' message. I included mmCheck before return from daemon function so I see memory map before removing daemon. As I can judge there is a memory leak connected with not complete cleanup after daemon termination. Is it a bug of NDK? Can I do something else to investigate the reason of this issue? Run #1 17:48 ( 26%) 20:96 ( 62%) 1:128 ( 4%) 5:256 ( 41%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 87/0/43, mmBulk: 3/0/1) 1 blocks alloced in 512 byte page 17 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 5 blocks alloced in 256 byte page Run #2 17:48 ( 26%) 20:96 ( 62%) 1:128 ( 4%) 6:256 ( 50%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 108/0/64, mmBulk: 4/0/2) 1 blocks alloced in 512 byte page 16 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #3 18:48 ( 28%) 20:96 ( 62%) 1:128 ( 4%) 8:256 ( 66%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 114/0/66, mmBulk: 5/0/2) 1 blocks alloced in 512 byte page 18 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 8 blocks alloced in 256 byte page Run #4 20:48 ( 31%) 20:96 ( 62%) 1:128 ( 4%) 10:256 ( 83%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 120/0/68, mmBulk: 6/0/2) 1 blocks alloced in 512 byte page 20 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 10 blocks alloced in 256 byte page Run #5 22:48 ( 34%) 20:96 ( 62%) 1:128 ( 4%) 12:256 (100%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 126/0/74, mmBulk: 7/0/2) 1 blocks alloced in 512 byte page 22 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 16 blocks alloced in 96 byte page 12 blocks alloced in 256 byte page Run #6 24:48 ( 37%) 20:96 ( 62%) 1:128 ( 4%) 14:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (18432/49152 mmAlloc: 136/0/80, mmBulk: 8/0/2) 1 blocks alloced in 512 byte page 24 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 16 blocks alloced in 96 byte page 12 blocks alloced in 256 byte page 2 blocks alloced in 256 byte page Run #7 26:48 ( 40%) 20:96 ( 62%) 1:128 ( 4%) 16:256 ( 66%) 1:512 ( 16%) 0:1536 0:3072 (18432/49152 mmAlloc: 142/0/82, mmBulk: 9/0/2) 1 blocks alloced in 512 byte page 26 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 16 blocks alloced in 96 byte page 12 blocks alloced in 256 byte page 4 blocks alloced in 256 byte page Run #8 28:48 ( 43%) 20:96 ( 62%) 1:128 ( 4%) 18:256 ( 75%) 1:512 ( 16%) 0:1536 0:3072 (18432/49152 mmAlloc: 148/0/84, mmBulk: 10/0/2) 1 blocks alloced in 512 byte page 28 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 16 blocks alloced in 96 byte page 12 blocks alloced in 256 byte page 6 blocks alloced in 256 byte page Run #9 30:48 ( 46%) 20:96 ( 62%) 1:128 ( 4%) 20:256 ( 83%) 1:512 ( 16%) 0:1536 0:3072 (18432/49152 mmAlloc: 154/0/86, mmBulk: 11/0/2) 1 blocks alloced in 512 byte page 30 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 16 blocks alloced in 96 byte page 12 blocks alloced in 256 byte page 8 blocks alloced in 256 byte page ti.sysbios.heaps.HeapMem: line 307: out of memory: handle=0x87b9b0, size=8200 <-.fardata:ti_sysbios_heaps_HeapMem_Object__table__V 00242.886 mmBulkAlloc(): could not allocate memory. 00242.887 out of memory: handle=0x800c05bc, size=0 <- ti_ndk_config_Global_pHdrMem @ 800bc480 in .far:NDK_PACKETMEM 00242.888 SBNew: Buffer OOM
↧
Forum Post: Could not allocate memory for NDK daemon
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
I further nailed down to root of the problem, the following 2 function if either or both are un commented in the code are not working. MMUConfigAndEnable() and IntMasterIRQEnable() 1. MMUConfigAndEnable() { /* ** Define DDR memory region of AM335x. DDR can be configured as Normal ** memory with R/W access in user/privileged modes. The cache attributes ** specified here are, ** Inner - Write through, No Write Allocate ** Outer - Write Back, Write Allocate */ REGION regionDdr = { MMU_PGTYPE_SECTION, START_ADDR_DDR, NUM_SECTIONS_DDR, MMU_MEMTYPE_NORMAL_NON_SHAREABLE(MMU_CACHE_WT_NOWA, MMU_CACHE_WB_WA), MMU_REGION_NON_SECURE, MMU_AP_PRV_RW_USR_RW, (unsigned int*)pageTable }; /* ** Define OCMC RAM region of AM335x. Same Attributes of DDR region given. */ REGION regionOcmc = { MMU_PGTYPE_SECTION, START_ADDR_OCMC, NUM_SECTIONS_OCMC, MMU_MEMTYPE_NORMAL_NON_SHAREABLE(MMU_CACHE_WT_NOWA, MMU_CACHE_WB_WA), MMU_REGION_NON_SECURE, MMU_AP_PRV_RW_USR_RW, (unsigned int*)pageTable }; /* ** Define Device Memory Region. The region between OCMC and DDR is ** configured as device memory, with R/W access in user/privileged modes. ** Also, the region is marked 'Execute Never'. */ REGION regionDev = { MMU_PGTYPE_SECTION, START_ADDR_DEV, NUM_SECTIONS_DEV, MMU_MEMTYPE_DEVICE_SHAREABLE, MMU_REGION_NON_SECURE, MMU_AP_PRV_RW_USR_RW | MMU_SECTION_EXEC_NEVER, (unsigned int*)pageTable }; /* Initialize the page table and MMU */ MMUInit((unsigned int*)pageTable); /* Map the defined regions */ MMUMemRegionMap(®ionDdr); MMUMemRegionMap(®ionOcmc); MMUMemRegionMap(®ionDev); /* Now Safe to enable MMU */ MMUEnable((unsigned int*)pageTable); } 2. EDMA3AINTCConfigure(void) calls-> IntMasterIRQEnable() calls ->CPUirqe() CPUirqe() { /* Enable IRQ in CPSR */ asm(" mrs r0, CPSR\n\t" " bic r0, r0, #0x80\n\t" " msr CPSR_c, r0"); } Please let me know why these functions don't work in bootloader?
↧
↧
Forum Post: RE: DRA7xx: Error on ./build-core-sdk.sh dra7xx-evm
Hi, Please confirm that the URL "git://gitorious.org/matrix-gui-v2/matrix-gui-v2-apps.git;protocol=git;branch=master" exists. Because I am unable to find this. I doubt that this URL does not exist and cause of that I am getting the problem. Rgds, VIjay
↧
Forum Post: RE: Could not allocate memory for NDK daemon
I found an answer. The answer is that I should read manual more carefully. If you are not closing socket in daemon callback then callback should return 1, otherwise return 0. Here is an output of the mmCheck of a healthy program just for reference Run #1 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 108/0/62, mmBulk: 4/0/2) 1 blocks alloced in 512 byte page 18 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #2 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 114/0/68, mmBulk: 5/0/3) 1 blocks alloced in 512 byte page 18 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #3 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 120/0/74, mmBulk: 6/0/4) 1 blocks alloced in 512 byte page 18 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #4 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 124/0/80, mmBulk: 7/0/5) 1 blocks alloced in 512 byte page 16 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #5 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 126/0/86, mmBulk: 7/0/6) 1 blocks alloced in 512 byte page 14 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 4 blocks alloced in 256 byte page Run #6 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 138/0/92, mmBulk: 9/0/7) 1 blocks alloced in 512 byte page 18 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 6 blocks alloced in 256 byte page Run #7 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 138/0/98, mmBulk: 9/0/8) 1 blocks alloced in 512 byte page 14 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 4 blocks alloced in 256 byte page ... Run #14 21:48 ( 32%) 20:96 ( 62%) 1:128 ( 4%) 7:256 ( 58%) 1:512 ( 16%) 0:1536 0:3072 (15360/49152 mmAlloc: 180/0/140, mmBulk: 16/0/15) 1 blocks alloced in 512 byte page 14 blocks alloced in 48 byte page 1 blocks alloced in 128 byte page 20 blocks alloced in 96 byte page 4 blocks alloced in 256 byte page ...
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
Finally if either Interrupts are enabled through CPSR and/or MMU is enabled in the MLO boot loader code the CPU hangs. I searched in the web and found that many people have reported the CPU freeze in u-boot when intterupts and enabled.
↧
↧
Forum Post: RE: OMAPL138 SYSBIOS ARM system memory access
Matt, Thanks for the additional details. GEL files are still used in CCS, and they are usually referenced in the ccxml file. So if you are using this same file in both cases it is not the issue. I think you should try enabling the MMU again. In your screenshot the “Enable MMU” box is checked. But the “Add the MMU module to my configuration” box is not. You need to click that box too, to bring in the MMU support into your application. Can you try doing that? If the MMU support is indeed included in your application you’ll see it in the “Outline View” that lists modules actually used in the application. This view is normally in the upper right corner in CCS. Thanks, Scott
↧
Forum Post: ./prj build fails while building linux-c6x-project. Any suggestions?
Hi; I am working on C6678LE. I have downloaded linux-c6x-2.0.0.63-src.tar.gz and after extracting it I typed command ./prj config and it successfully downloaded and installed gcc tool chain for c6x. When I inserted command ./prj build It started to build linux 2.0 but at the nd it failed with error as shown below: make[6]: *** No rule to make target `/home/tom/my-linux-c6x/linux-c6x-2.0.0.63/Build/kobjs/evmc6678.el/firmware/keystone-pdsp/', needed by `firmware/keystone-pdsp/pa_pdsp_default.fw.gen.S'. Stop. Any help in this regard will be appreciated. Regards Basit
↧
Forum Post: RE: ./prj build fails while building linux-c6x-project. Any suggestions?
Please refer to the following links. linux-c6x.org/.../FAQ linux-c6x.org/.../Main_Page
↧
Forum Post: RE: Linux-c6x ./prj config does not install gcc toolchain (4.5-124) for linux-c6x 2.0 release automatically
You may have to tweak the "setenv" file as per your host env . Please refer to the following links. linux-c6x.org/.../FAQ linux-c6x.org/.../Main_Page
↧
↧
Forum Post: RE: ./prj build fails while building linux-c6x-project. Any suggestions?
Thanks Titus; I am following the same webpages to setup linux. But I can't understand why this error is generated? Could you please explain why it is generated. I am using fedora 18 with CCS 5.2.1. I am using CCS5.2.1 because it is in DVD shipped with the board.
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
Seetaram, Following are the reasons for difference in performance of MMCSD from in bootloader and application 1. In bootloader MMCSD is in polling mode and in application it uses DMA in interrupt mode 2. Cache and MMU are enabled in application but not in bootloder To enable these features in bootloder following modifications are required. 1. Startup code and linker file to be modified to use interrupt. 2. system_config library has to be linked 3. Interrupt handling and EDMA configuration from application have to be ported to bootloder use case. In bootloder file is read from Card in chunks into internal memory and copied to DDR. Instead it can be copied to DDR directly. Regards, Ramesh D
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
Hi Ramesh, Thanks for the response. I have analyzed these details and was trying to incorporate these changes in the boot loader code. I have ported the code from hs_mmcsd into boot loader. 2 things are not working. Interrupts and MMU. What changes are required in startup code and linker command file to handle interrupts? Why cache and MMU cannot be enabled in Boot loader? Any specific reason? If i don't enable MMU, just with EDMA mode can i get the required SD card throughput (24Mbytes/sec)? Infact i had tried to copy directly to DDR from SD card but it didn't really help a lot. Regards, Seetaram
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
Usually interrupt are avoided in bootloder. Using EDMA in polling mode is another option.
↧
↧
Forum Post: RE: TI Starterware boot loader from SD card takes long time
What changes are required in startup code and linker command file to handle interrupts? The init code and startup code shall have vector table configuration for IRQ handled. For the difference compare the init.S of bootloder and application. With is include system_config library Why cache and MMU cannot be enabled in Boot loader? Any specific reason? Bootloder executes from internal memory. So Cache may not have significant impact on performance in this case. No definite reason why it should not be enabled. If i don't enable MMU, just with EDMA mode can i get the required SD card throughput (24Mbytes/sec)? Cache and MMU definitely have significant impact in case of application. Run the application without Cache and MMU enabled and compare with it. But do not know the impact of the same in bootloder with EDMA. Infact i had tried to copy directly to DDR from SD card but it didn't really help a lot. Ok Regards, Ramesh D
↧
Forum Post: RE: Minimal example build using CCSv6, TI-RTOS & msp430f5438 won't run
Hi, I have the same problem.The functions are declared in intrinsics.h. But if you work with code composer the __ICC430__ is not defined( it is defined with IAR) To remove the warning you have ton comment the defined //#if defined(__ICC430__) #include //#endif
↧
Forum Post: RE: Could not allocate memory for NDK daemon
Hello Sam, Glad to here that the issue is resolved. Thank you for the update.
↧
Forum Post: Test MCBSP CPU interrupts in C6657 platform
Dear all , I try to test the MCBSP CPU interrupts. I am using the CpIntc_postSysInt function to trigger the functions that are related with the MCBSP. But the interrupt is not generated and the functions tx and rx functions are not called. I have gone through the EDMA interrupt setup and I have used this as template. Below you can find the piece of the code that I use. I have defined the following types static xdc_Int const CICO_RX[CPU_CORES][PCM_MAX_LINES] = { /// CIC0_OUT(4+20*n) /// CIC0_OUT(5+20*n) /// n is the core number { 4, 5, }, { 24, 25 } }; static xdc_Int const CICO_TX[CPU_CORES][PCM_MAX_LINES] = { /// CIC0_OUT(6+20*n) /// CIC0_OUT(7+20*n) { 6, 7, }, { 26, 27 } }; static xdc_Int const RINT_Event[PCM_MAX_LINES] = { 32, 36 }; static xdc_Int const XINT_Event[PCM_MAX_LINES] = { 33, 37 }; typedef struct mcsbp_fxns_ { CpIntc_FuncPtr tx_fxn; CpIntc_FuncPtr rx_fxn; }mcsbp_fxns_t; static mcsbp_fxns_t const fxns[] = { { &tx_function0, &rx_function0, }, { &tx_function1, &rx_function1 } }; In addition to the definition of these types I have written the following code to set up the rx and tx events cookie = Hwi_disable(); xdc_UInt core_id = determineProcId(); //############################################################################ //NOTE: Reference table 7.33 TMS320C6655/57 for(line = 0; line < PCM_MAX_LINES; line++) { /// Trasmit CpIntc_mapSysIntToHostInt(core_id, XINT_Event[line], CICO_TX[core_id][line]); /// Configures a CpIntc ISR dispatch entry CpIntc_dispatchPlug(XINT_Event[line], fxns[line].tx_fxn, line, TRUE); ///Enables the host interrupt CpIntc_enableHostInt(core_id, CICO_TX[core_id][line]); // Enable the System Interrupt CpIntc_enableSysInt(core_id, XINT_Event[line]); int tx_event = CpIntc_getEventId(CICO_TX[core_id][line]); EventCombiner_dispatchPlug (tx_event, CpIntc_dispatch, CICO_TX[core_id][line], TRUE); EventCombiner_enableEvent(tx_event); //############################################################################ // receive CpIntc_mapSysIntToHostInt(core_id, RINT_Event[line], CICO_RX[core_id][line]); /// Configures a CpIntc ISR dispatch entry CpIntc_dispatchPlug(RINT_Event[line], fxns[line].rx_fxn, line, TRUE); /// Enables the host interrupt CpIntc_enableHostInt(core_id, CICO_RX[core_id][line]); /// Enable the System Interrupt CpIntc_enableSysInt(core_id, RINT_Event[line]); int rx_event = CpIntc_getEventId(CICO_RX[core_id][line]); EventCombiner_dispatchPlug (rx_event, CpIntc_dispatch, CICO_RX[core_id][line], TRUE); EventCombiner_enableEvent(rx_event); } Hwi_enableInterrupt(7); /* Restore interrupts */ Hwi_restore(cookie); I cannot find where is the problem and the related functions are not called. Could you please help me with this issue? Best regards George
↧
↧
Forum Post: How to use edma3lld_01_11_02_05
My SDK is dvsdk_omapl138-evm_04_03_00_06_setuplinux,when install completely generate dvsdk directory ,and the edma3lld_01_11_02_05 directory is in the dvsdk directory. The omapl138 has dsp core and arm core,I want to use edma3 on dsp core.I found edma3 driver is in edma3lld_01_11_02_05 directory. So my question is how to use edma3lld_01_11_02_05? Looking forward to your reply,thanks.
↧
Forum Post: RE: Loading StarterWare via u-boot on AM3359
Hi John, Could you share your solution about how to use u-boot to boot starterware app image? I have the same issue as yours.
↧
Forum Post: RE: Minimal example build using CCSv6, TI-RTOS & msp430f5438 won't run
Hi, I have the same problem.The functions are declared in intrinsics.h. But if you work with code composer the __ICC430__ is not defined( it is defined with IAR) To remove the warning you have ton comment the defined //#if defined(__ICC430__) #include //#endif
↧