> Ref. your "todo:" shouldn't that be sorted out before we merge it?
>
> How does this affect the arm target?


The actual code in HEAD tries to load arm code to mips target. Bad idea. :-)

My patch checks for mips target and branches if needed. All other targets
are not affected.

This is the reason why I placed the "todo". Maybe there are more targets
that are not supported. The right way would be to check if target is
supported. Since I don't have experience with arm targets, I don't know
what has to be included to the if-condition.

If wanted, I would rewrite the patch using this way:

     static int cfi_spansion_write_block(...)
     {
        if (target == mips)
           return cfi_spansion_write_block_mips(...);
        if (target == arm)      
           return cfi_spansion_write_block_arm(...);

        /* all other targets: no block write available */
        return ERROR_TARGET_RESOURCE_NOT_AVAILABLE;
     }

In this case someone should give me an expression for "target == arm".


BR,
Stefan

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to