Tried the K22FN512. Initially, MCU was unsupported, so I added this to
kinetis.c:
diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c
index 0b55f9e..925b98d 100644
--- a/src/flash/nor/kinetis.c
+++ b/src/flash/nor/kinetis.c
@@ -1160,7 +1160,10 @@ static int kinetis_read_part_info(struct flash_bank
*bank)
kinfo->max_flash_prog_size = 1<<10;
} else {
/* K22 with new-style SDID? */
- break;
+ pflash_sector_size_bytes = 2<<10;
+ num_blocks = 2;
+ kinfo->flash_support =
FS_PROGRAM_PHRASE | FS_PROGRAM_SECTOR;
+ kinfo->max_flash_prog_size = 2<<10;
}
break;
}
But that ended up briking the K22 when I tried to program it:
Open On-Chip Debugger 0.10.0-dev-00027-ge7188cd (2015-09-24-14:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : FTDI SWD mode enabled
Warn : Transport "swd" was already selected
Info : add flash_bank kinetis k22.flash
adapter speed: 1000 kHz
none separate
cortex_m reset_config sysresetreq
adapter speed: 1000 kHz
Info : clock speed 1000 kHz
Info : SWD IDCODE 0x2ba01477
Info : k22.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : MDM: Chip is unsecured. Continuing.
Info : accepting 'gdb' connection on tcp/3333
Info : MDM: Chip is unsecured. Continuing.
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000004d8 msp: 0x20010000
Info : Probing flash info for bank 0
Info : MDM: Chip is unsecured. Continuing.
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x000004d8 msp: 0x20010000
Warn : flash configuration field erased, please reset the device
Info : SWD IDCODE 0x2ba01477
Error: Failed to write memory at 0x14000004
Error: target_write_memory failed
Error: error writing to flash at address 0x00000000 at offset 0x00000000
Info : MDM: Chip is unsecured. Continuing.
in procedure 'reset'
in procedure 'ocd_bouncer'
Info : SWD IDCODE 0x2ba01477
Polling target k22.cpu failed, trying to reexamine
Info : SWD IDCODE 0x2ba01477
Info : SWD IDCODE 0x2ba01477
Error: Failed to read memory at 0xe000ed00
- Thomas
On Thu, Sep 24, 2015 at 12:23 PM, Thomas Schmid <[email protected]>
wrote:
> We have the FN512, so perfect! I will give this a try either this
> afternoon or tonight.
>
> - Thomas
>
>
> On Thu, Sep 24, 2015 at 9:45 AM, Tomas Vanek <
> [email protected]> wrote:
>
>> Thomas,
>>
>> better late than never :-)
>> At http://openocd.zylin.com search for 2867.
>> From "Download" copy a command for checkout and apply to your local git
>> OpenOCD clone.
>> git log should show 3 relevant changes at the top:
>> "Kinetis: new devices K26, K66, correct K22_M120"
>> "Kinetis: give a reasonable default for max_flash_prog_size"
>> "Kinetis: Add K24 support and tidy up"
>> Compile and test, test mainly flash commands including gdb load and also
>> "kinetis mdm mass_erase"
>> Do not try writing to FlexNVM, it does not work.
>> See file HACKING for more info.
>>
>> BTW I tested K22FN1M0. Hopefully you have any of K22FN256, FN512 or
>> FX512, they have
>> different flash configuration and we need to test them.
>>
>> Tom
>>
>>
>> On 24.09.2015 16:50, Thomas Schmid wrote:
>>
>> Hi Tomas,
>>
>> I am a little bit late to the party, but can you give me a quick "howto"
>> to get the exact version you want tested? I have K22 and KL16 boards
>> available and very eager to test them!
>>
>> - Thomas
>>
>>
>> On Thu, Sep 24, 2015 at 7:29 AM, Tomas Vanek <
>> [email protected]> wrote:
>>
>>> Thanks Paul for clarification.
>>>
>>> You should give thanks to Patrick Stewart, author of original #2864. I
>>> just was not brave enough
>>> to get rid of old rubbish "granularities" from the driver.
>>> Now I just added what I need just now (and what I'm able to test).
>>> Unfortunately Patrick stopped responding - he might got tired of my
>>> gerrit comments? (ehm sorry, Patrick)
>>> Anyway I recommend #2864 and #2958 for merging ASAP to make next work
>>> easier.
>>> If anybody can test the changeset (#2864, #2867 and #2958) with any K20
>>> kit or a KL please do a review.
>>>
>>> Yes I saw #2773 shortly after Andreas uploaded it. Well, there are some
>>> changes worth to implement.
>>> But the basic problem remains: absolute lack of testers, no support from
>>> Freescale and therefore
>>> low motivation for me and other developers.
>>>
>>> Tom
>>>
>>> On 24.09.2015 13:40, Paul Fertser wrote:
>>> > Hi,
>>> >
>>> > On Thu, Sep 24, 2015 at 01:16:06PM +0200, Tomas Vanek wrote:
>>> >> can anybody explain me why gerrit web shows "Cannot Merge" message?
>>> >> I rebased all 3 dependent changes and gerrit insists on "Cannot
>>> Merge".
>>> >> The change merges in my local git without any problem
>>> >> and jenkins has verified it ok.
>>> > The Gerrit merge policy is set to cherry-pick, so it considers every
>>> > "Change" in isolation. Of course all of your patches but the first one
>>> > cannot be merged before their dependencies are merged.
>>> >
>>> > Just do not worry about it. And big thanks for the patches, finally
>>> > someone motivated starts working on fixing kinetis :) Have you seen
>>> > the odd freescale patch yet http://openocd.zylin.com/#/c/2773/ ?
>>> >
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Monitor Your Dynamic Infrastructure at Any Scale With Datadog!
>>> Get real-time metrics from all of your servers, apps and tools
>>> in one place.
>>> SourceForge users - Click here to start your Free Trial of Datadog now!
>>> http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
>>> _______________________________________________
>>> OpenOCD-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/openocd-devel
>>>
>>
>>
>>
>
------------------------------------------------------------------------------
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel