Quantcast
Channel: Renesas Synergy Platform
Viewing all 23645 articles
Browse latest View live

Forum Post: Create ramdisk for FileX access

$
0
0
Hi all, I already posted a topic on the use of a webserver but I prefer create a new topic for this problem. I downloaded and imported the demo available at Renesas Project Synergy ™ USBX ™ Mass Storage Class (Host) in e²studio but when I want to go into debug mode I get the message: Exception occured during launch. Reason: Program files does not exist. So I can not test this program or use it. Actually, I need to go get some files, but these files are slightly larger (a few kb), I would store them directly into the uP without having to use a USB key every time. So my question is, how to create a ramdisk and how do I store files in the ramdisk please? (Knowing that the files are on my PC initially) Once stored files, the goal is to go play with FileX. EDIT: I work on SK-S7G2

Forum Post: RE: Create ramdisk for FileX access

$
0
0
I think I have managed to create the ramdisk, with this code: UCHAR                   ram_disk_memory[1024 * 32]; UCHAR                   ram_disk_sector_cache[512]; FX_MEDIA                ram_disk_media; extern VOID    _fx_ram_driver(FX_MEDIA *media_ptr);     status = fx_media_format(&ram_disk_media,                           _fx_ram_driver,                  /* Driver entry             */                           ram_disk_memory,                 /* RAM disk memory pointer  */                           ram_disk_sector_cache,           /* Media buffer pointer     */                           sizeof(ram_disk_sector_cache),   /* Media buffer size        */                           (CHAR*)"MY_RAM_DISK",            /* Volume Name              */                           1,                               /* Number of FATs           */                           32,                              /* Directory Entries        */                           0,                               /* Hidden sectors           */                           256,                             /* Total sectors            */                           128,                             /* Sector size              */                           1,                               /* Sectors per cluster      */                           1,                               /* Heads                    */                           1);                              /* Sectors per track        */   /* Open the RAM disk.  */   status = fx_media_open(&ram_disk_media, (CHAR*)"RAM DISK", _fx_ram_driver, ram_disk_memory, ram_disk_sector_cache, sizeof(ram_disk_sector_cache)); this test code works:   int j=0;   UCHAR my_buffer[128];   for(j=0;j =127;j++){   my_buffer[j]=j+1;}   status = fx_media_write(&ram_disk_media, 2, my_buffer); if(status == FX_SUCCESS) thread_0_counter=3; My counter shows well the value 3, so I suppose that the contents of my_buffer has been written to the ramdisk. I will now check if the good values were stored with this code: UCHAR my_read[128]; //to read status = fx_media_read(&ram_disk_media,2,my_read); if(status == FX_SUCCESS) thread_0_counter=my_read[30]; My counter shows well the value 31. Could you now tell me how to manage files in a Synergy project please ? The goal is to store an index.html file, previously created, in the memory of µP order to go read it directly with FileX. Should there be a specific section in memory to store these files? Thank you in advance

Forum Post: RE: Programming through Self-Programming

$
0
0
In the S7 Users manual section 5 it refers to a Memory Mirror Function (MMF).  It would seem the functionality needed above could be implemented using this.  My question is would this be as simple as writing a bare metal application which resides at address 0 in flash, which upon boot simply sets the needed mirror registers to point to the load of interest in the flash, and then kick off execution from there?  Or is there a current boot loader that needs to be modified to implement this?

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
Thanks for your answers. How do I specify which section (on-chip vs off-chip memory) the variables, heap, stacks get assigned to, including cache. Is this to be specified in the linker ld file? If so, is there an example for the S7 synergy specific case? Also, I tried including the  -fstack-usage -fstack-check compiler flags (in C/C++ Build - Settings - Miscellaneous - Other compiler flags) in an effort to see the stack allocations (this is because I'm getting a MPU stack error NMI interrupt). My understanding is that this will give a *.su file with the stack allocation summary. In these files, what do the terms static, dynamic and bounded mean?

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
To place different sections at different locations you will need to modify the linker file. The templates and demo projects come with a generic linker file that you can modify to accomplish your objectives. I am not familiar with -fstack-usage of -fstack-check.

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
You can see the documentation for these options here: gcc.gnu.org/.../Static-Stack-Usage-Analysis.html gcc.gnu.org/.../Stack-Overflow-Checking.html

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
Specifically for what you are seeing (MPU stack error), I would say that the software that you are trying is overflowing somewhere, maybe some buffer is not big enough for what you are doing. In your place I would take a look at the map file and see if it shows sections placed as you assume that they are.

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
Also, the MPU stack error is trigger by a thread stack pointer exceeding the stack size configured for that particular thread (the HW stack monitor it is set to the base and size of the current thread stack by the threadx kernel, when setting up the thread to run). Local variable in a task will be created on the thread stack, so make sure the thread stack is large enough for any local variables, and normal code execution (or make the variables global).

Forum Post: RE: Difference between BSP stack, BSP heap and thread specific stack and heap

$
0
0
In my experience, a simple thread can have 1k stack, but a thread using NetX would be better off with 4k, as well as a thread using USBX.

Forum Post: USBX device error leads to fault -_ux_dcd_rx_transfer_callback()

$
0
0
I'm getting the below stack frame error as a result of a hard fault handler being triggered. Does anyone know what this means? prvGetRegistersFromStack() at startup_S7G2.c:497 0x1df20 signal handler called () at 0xfffffff1 _ux_dcd_rx_transfer_callback() at ux_dcd_rx_transfer_callback.c:477 0x1e70 _ux_dcd_rx_interrupt_handler() at ux_dcd_rx_interrupt_handler.c:295 0x180c usbfs_usbi_isr() at usbfs_irq_veneer.c:32 0x59a signal handler called () at 0xfffffff1 __ISB() at core_cmInstr.h:462 0x742a PendSV_Handler() at tx_thread_schedule.c:257 0x742a -------------------------------------------------------------------------------------------------------- My code for initializing the usb device is: ux_system_initialize((CHAR *) first_unused_memory, (1024 * 128), UX_NULL, 0);     /* The code below is required for installing the device portion of USBX.      * In this demo, DFU is possible and we have a call back for state change. */     status =  _ux_device_stack_initialize(device_framework_high_speed, DEVICE_FRAMEWORK_LENGTH_HIGH_SPEED,                                           device_framework_full_speed, DEVICE_FRAMEWORK_LENGTH_FULL_SPEED,                                           string_framework, STRING_FRAMEWORK_LENGTH,                                           language_id_framework, LANGUAGE_ID_FRAMEWORK_LENGTH, UX_NULL);     if (status != UX_SUCCESS)     {         return ;     }     /* Store the number of LUN in this device storage instance.  */     storage_parameter.ux_slave_class_storage_parameter_number_lun = 1;     /* Initialize the storage class parameters for reading/writing to the Flash Disk.  */     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_last_lba       =         UX_RAM_DISK_LAST_LBA;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_block_length   =  512;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_type           =  0;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_removable_flag =  0x80;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_read           =         tx_demo_thread_media_read;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_write          =         tx_demo_thread_media_write;     storage_parameter.ux_slave_class_storage_parameter_lun[0].ux_slave_class_storage_media_status         =         tx_demo_thread_media_status;     /* Initilize the device storage class. The class is connected with interface 0 on configuration 1. */     status =  _ux_device_stack_class_register(_ux_system_slave_class_storage_name, _ux_device_class_storage_entry,                                               1, 0, (VOID *) &storage_parameter);     if (status != UX_SUCCESS)     {         return ;     }     _ux_dcd_rx_initialize(0);

Forum Post: RE: USBX device error leads to fault -_ux_dcd_rx_transfer_callback()

$
0
0
Using the pointer "first_unused_memory" in tx_application_define() can be dangerous, as there is no check that memory you use is actually valid. Try replacing the pointer "first_unused_memory" with a statically allocated global array of the required size and see if the application will link.

Forum Post: RE: Programming through Self-Programming

$
0
0
I have asked the development team to comment. Look for more information later today or tomorrow.

Forum Post: RE: Programming through Self-Programming

$
0
0
I have created my bootloader with these basic functions: #include stdlib.h   #include stdio.h #include string.h #include "hal_data.h" #include "Debug.h" #include "FlashUp.h" #define ENGINE_START_ADDR 0x00200000 #define FLASH_START_ADDR 0x00100000 #define RAM_START_ADDR 0x1FFE0000 typedef void (*pFunction)(void); void JumpToAddress(unsigned long address) { uint32_t JumpAddress; pFunction JumpFunction; int xx; g_timer.p_api- close(g_timer.p_ctrl); g_uart_pc.p_api- close (g_uart_pc.p_ctrl); g_uart_mydebug.p_api- close (g_uart_mydebug.p_ctrl); g_flash_hp.p_api- close (g_flash_hp.p_ctrl); R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS); __disable_irq(); __DMB(); /* Re-map the Vector Table Offset Register to SRAM */ for(xx=0; xx 96; xx++) R_ICU- IELSRn[xx]=0; SCB- VTOR = (uint32_t)address; __DSB(); JumpAddress = *(__IO uint32_t*) (address+4); /* Jump to address */ JumpFunction = (pFunction) JumpAddress; /* Initialize user address Stack Pointer */ __set_MSP(*(__IO uint32_t*) address); JumpFunction(); } void JumpToEngineRam(void) { JumpToAddress(RAM_START_ADDR); } void JumpToEngineFlash(void) { JumpToAddress(ENGINE_START_ADDR); } void JumpToFlash(void) { JumpToAddress(FLASH_START_ADDR); } void JumpToZero(void) { JumpToAddress(0x00000000); } void g_flash_hp_callback(flash_callback_args_t * p_args) { Debug_Write("g_flash_hp_callback"); if(p_args- event==0) { } } ssp_err_t Init_FlashProgr(void) { ssp_err_t err; err = g_flash_hp.p_api- open (g_flash_hp.p_ctrl, g_flash_hp.p_cfg); if(err) { g_flash_hp.p_api- close (g_flash_hp.p_ctrl); err = g_flash_hp.p_api- open (g_flash_hp.p_ctrl, g_flash_hp.p_cfg); } return err; } ssp_err_t EraseChip(uint32_t Address) { ssp_err_t err; err = g_flash_hp.p_api- erase(g_flash_hp.p_ctrl, Address, 1); return err; } ssp_err_t ProgramPage(uint32_t Address, uint32_t Size, unsigned char *data) { ssp_err_t err; err = g_flash_hp.p_api- write(g_flash_hp.p_ctrl, (uint32_t)data, Address, Size); return err; } ssp_err_t ProgramVerify(uint32_t Address, uint32_t Size, unsigned char *data) { ssp_err_t err; unsigned char readdata[1024]; err = g_flash_hp.p_api- read(g_flash_hp.p_ctrl, readdata, Address, Size); if(memcmp(readdata, data, Size)!=0) err = SSP_ERR_READ_FAILED; return err; } And use __disable_irq (); EraseChip (Address) ; ProgramPage (Address, 1024, &rx_data[4]) ; ProgramVerify (Address, 1024, &rx_data[4]) ; __enable_irq ();

Forum Post: RE: Programming through Self-Programming

$
0
0
Remote Firmware Upgrades will be supported in a future release of the Synergy Software Package. It will use the Memory Mirror feature, making the configuration of the projects and the updates simple.

Forum Post: RE: DK-S7G2 eMMC example

$
0
0
You had the "Format Media During Installation" enabled, so you might want to review that, since it could cause you to lose data.

Forum Post: RE: Adding FileX Source (fx_src) to a project results in MPU Stack Error

$
0
0
Have you inspected the BSP configuration to see if the Memory Protection is enabled? You can try turning it off for all of the memory to see if the error goes away. I'd also suggest looking at one of the App Notes that uses File-X to see how the memory is configured in the BSP configuration.

Forum Post: RE: DK-S7G2 eMMC example

$
0
0
Yes.  I am working with a new DK board and needed to format the on-board eMMC so I left that enabled the first time.  Yesterday I reworked everything just they way I want it to run from my application rather than using the Synergy services from mainThread.  The format routine is now accessed from another path so it is only performed when needed. Thanks again.

Forum Post: RE: Programming through Self-Programming

$
0
0
is there a list of items that you can provide which will be supported in the future release of the SSP. And is the future release 1.1.0 (i.e. the graduation of 1.1.0-alpha) and when will this be released?

Forum Post: Has anyone played around with Open-OCD debug in e2studio?

$
0
0
I'm curious to know if anyone has had success connecting with this using an FTDI chip, or via some other hardware configuration? Does it work under the last release for e2studio and SSP 1.0.0? http://discboards.org/   Click on "For more information" to get to the Open-OCD extensions for Synergy. 

Forum Post: porting a Linux/POSIX application to ThreadX

$
0
0
I've seen a couple of posts about porting code to Thread-X and Synergy. There's a webinar available for download that covers porting from various RTOS and POSIX threading APIs. It describes a third party tool that might help. (Note that Thread-X does have a POSIX layer that can be used to help with those ports.  http://rtos.com/products/threadx/Compatibility_for_POSIX  ) http://info.mapusoft.com/Webinar3-29-11Webdnldpg.html This would be useful if you have code written under Nucleus, uItron, pSOS, POSIX, VxWorks, Micrium uC/OSII or other RTOS. --CG
Viewing all 23645 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>