Dear all, I am trying to get openocd work with my Motorola/Freescale/Nxp dsp56l307evm evaluation board. This works more or less but I do run in all kind of smaller issues. For the most resent problem I need some advise how I could solve this.
The board has a 128kByte 8bit wide flash chip (AT29LV010A) mapped in its program memory range from 0x04000. The bus of the dsp is 24bit wide (but is padded to 32bit to work with openocd.) The bootloader would, when accessing the flash, only look at the bottom 8 bits of each word and then combine three of them in the internal memory to a valid 24bit instruction. So I would expect that I can access the flash by: flash bank $_FLASHNAME cfi 0x040000 0x020000 1 4 $_TARGETNAME jedec_probe But actually is then the addressing wrong: The configuration registers of the flash would be at 0x045555 and 0x042AAA. However in the flash_address function in cfi.c is the address calculated as: return bank->base + offset * bank->bus_width; 0x040000 + 5555 * 4 Which result in 0x055554 instead of 0x045555 and consequently the flash chip is not found. When I initialize as follows: flash bank $_FLASHNAME cfi 0x040000 0x020000 1 1 $_TARGETNAME jedec_probe Then is the addressing correct but I should do some kind of 2(3) byte padding to make from all the 1 byte instructions/data going to the flash real good word wide access as supported by the DSP. Currently is the dsp563xx target giving a ERROR_COMMAND_SYNTAX_ERROR when 1 byte wide data is received. I was wondering what the general opinion would be how to deal with this properly. I see now roughly two options: 1. Adding an option to the CFI driver that a MSB or LSB type of mapping is used. so that the bytes going and coming from the flash are packed into the MSB or LSB of the word wide bus of the processor. 2. Adding zero padding to the memory access functions of the dsp when the received/exchanged word size==1. Option 1 can have impact on others and it looks like that only me (the dsp563xx target) has a problem with this type of connection to the flash. With option 2 I am adding data changes in the background which could give problems/surprises when byte wise data is loaded in the normal memory and the expectation is that 3 bytes will form one word and not each byte becomes its own word. Has someone a suggesting how to deal with this? Kind regards, Han
_______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
