Coder Social home page Coder Social logo

Comments (14)

SummerFalls avatar SummerFalls commented on June 8, 2024

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls 感谢回复!

若填充了g_flashDriverRAM数组,重新打开“EN_FLASH_DRIVER_DEBUG”这个宏定义,根据代码逻辑,会调用到原本的正常函数,就不是用数组函数了,代码段如下:
#ifdef EN_FLASH_DRIVER_DEBUG /* TODO S32K_FlashDrv: #06 This macro is in the header file: flash_driver.h */
g_pFlashDriverAPIRAM = (tFlashDriverAPIInfo *)g_flashDriverRAM;
g_pFlashDriverAPIRAM->pfFLASH_DRV_EraseSector = FLASH_DRV_EraseSector;
g_pFlashDriverAPIRAM->pfFLASH_DRV_VerifySection = FLASH_DRV_VerifySection;
g_pFlashDriverAPIRAM->pfFLASH_DRV_Program = FLASH_DRV_Program;
g_pFlashDriverAPIRAM->pfFLASH_DRV_ProgramCheck = FLASH_DRV_ProgramCheck;
#else
g_pFlashDriverAPIRAM = (tFlashDriverAPIInfo *)g_flashDriverRAM;
g_pFlashDriverAPIRAM->pfFLASH_DRV_EraseSector = (tpfFLASH_DRV_EraseSector) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_EraseSector));
g_pFlashDriverAPIRAM->pfFLASH_DRV_VerifySection = (tpfFLASH_DRV_VerifySection) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_VerifySection));
g_pFlashDriverAPIRAM->pfFLASH_DRV_Program = (tpfFLASH_DRV_Program) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_Program));
g_pFlashDriverAPIRAM->pfFLASH_DRV_ProgramCheck = (tpfFLASH_DRV_ProgramCheck) ((uint32_t)g_flashDriverRAM + (uint32_t)(g_pFlashDriverAPIRAM->pfFLASH_DRV_ProgramCheck));
#endif

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

OK,记忆有偏差。你提取的bin文件的数组前几行数据能贴一下吗

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls
可以,从提取内容来看,至少表头看起来是有了的。
0x11, 0x00, 0x00, 0x00, 0x9D, 0x01, 0x00, 0x00, 0x11, 0x03, 0x00, 0x00, 0xC9, 0x04, 0x00, 0x00,
0x80, 0xB5, 0x88, 0xB0, 0x00, 0xAF, 0xF8, 0x60, 0xB9, 0x60, 0x7A, 0x60, 0xFB, 0x68, 0x5A, 0x1E,
0x93, 0x41, 0xDB, 0xB2, 0x18, 0x00, 0xF0, 0xF7, 0xD5, 0xFC, 0x12, 0x23, 0xFB, 0x18, 0x00, 0x22,
0x1A, 0x80, 0x7B, 0x68, 0xBB, 0x61, 0xFB, 0x68, 0x9B, 0x68, 0x7B, 0x61, 0xBA, 0x68, 0x7B, 0x69,
0x9A, 0x42, 0x1B, 0xD3, 0xFB, 0x68, 0xDA, 0x68, 0x7B, 0x69, 0xD2, 0x18, 0xBB, 0x68, 0x9A, 0x42,
0x14, 0xD9, 0xBB, 0x68, 0x07, 0x22, 0x13, 0x40, 0x5A, 0x42, 0x53, 0x41, 0xDB, 0xB2, 0x18, 0x00,
0xF0, 0xF7, 0xB8, 0xFC, 0xBA, 0x68, 0x7B, 0x69, 0xD3, 0x1A, 0x80, 0x22, 0x12, 0x04, 0x94, 0x46,
... ... ... ...

image

hello_world_s32k118Extracted.zip

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

你导出的函数,从第二个函数开始的相对地址跟我的118工程不太一样,可能你有步骤遗漏吧,比如从 144 迁移到 118 时, flash_driver.c 的代码你有没有做相应处理。

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls
Modified Source Files:

    1. NVM_Flash.h
    1. NVM_Flash.c
    1. flash_driver.h
    1. flash_driver.c
    1. S32K144_64_flash.ld(实际使用的S32K118)

根据你的注释,除了linker文件以外,其余都是直接拷贝git flash driver工程中的文件。包括main,c。

函数的相对地址和你生成的确实不一样,会不会是118和144的平台差异呢?还是说只要函数内容一致的话,这里hex数组的大小和内容就应该是一致的?这一点也是我比较疑惑的。

hello_world_s32k118.zip

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

不建议直接拷贝和覆盖。

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls

你提到过144和118测试过都能支持,那你有没有印象,这两个平台编译出来的flash driver hex是一致的吗?

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

不一致。

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

感谢,我再继续定位定位

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls
方不方便借鉴下你的S32K118的flash driver工程?

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

S32K118 工程只提供最新的代码,并不免费提供。但是本仓库免费。

from uds_s32k144_flashdriver.

AICrazy avatar AICrazy commented on June 8, 2024

@SummerFalls
好的,S32K118怎么收费的,想了解下。

from uds_s32k144_flashdriver.

SummerFalls avatar SummerFalls commented on June 8, 2024

@SummerFalls 好的,S32K118怎么收费的,想了解下。

报价已发送到您的邮箱:[email protected]

from uds_s32k144_flashdriver.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.