编译问题

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

编译问题

Jump to solution
3,621 Views
harry_liang
Contributor II

Hi,@kerryzhou

 我在用MCUXpresso 编译文件时,出现的crc校验问题,想请教下你,checksum 是怎么得来的,是不是bin文件里所有字节相加的和的结果呢?如果知道的话,可以告诉我吗,谢谢!

harry_liang_0-1603436931959.png

 

0 Kudos
1 Solution
3,574 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi harry_liang,

   From the MCUXPresso IDE, the checksum should be used for the LPC product, not the RT product.

image.png

从你上次的checksum报的问题的地方看,结合我之前对LPC产品的支持,这个checksum通常是给LPC用的,有些LPC它的checksum就放在flash的0X1C的偏移地址,用于对于整个image的checksum值。

但是RT产品它是不一样的,他的flash偏移0X1C是要用作其他用处,所以我认为MCUXPresso IDE的checksum不能用于RT芯片。我认为它这么强制添加,会导致FCBC区域数据的破坏。

或许, 你需要生成checksum放在你具体自定义的flash区域,然后你做OTA的时候,再去读取与对比。

Best Regards,

Kerry

View solution in original post

9 Replies
3,615 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi harry_liang,

  楼主你好!

  你这是什么芯片,什么工程导致这个问题的?

   你用官方例程没有问题吧?你是在官方例程的基础上,加什么才能复现你现在的问题,我要复现下你的问题,并且具体查看下。

 

Wish it helps you!

If you still have questions about it, please kindly let me know!

Best Regards,

Kerry

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

-----------------------------------------------------------------------------

0 Kudos
3,611 Views
harry_liang
Contributor II

Hi,kerry

我这个是RT1020的芯片,用里面的例程也可以,比如里面的例程“evkmimxrt1020_hello_world”,

harry_liang_0-1603442701221.png

 

0 Kudos
3,606 Views
kerryzhou
NXP TechSupport
NXP TechSupport

image.png

看我的编译结果,没有你遇到的问题。

你MCUXpresso IDE什么版本的?

我是MCUXpresso IDE v11.2.0_prc2 [Build 4095]

Wish it helps you!

If you still have questions about it, please kindly let me know!

Best Regards,

Kerry

-------------------------------------------------------------------------------

Note:

- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored

Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

-----------------------------------------------------------------------------

 

0 Kudos
3,602 Views
harry_liang
Contributor II

harry_liang_0-1603444013978.png

 

你要像图片中的设置里打开checksum才能看到。我主要是要得到文件的checksum。而我算出的checksum的方法是算出bin文件中的所有字节加起来的总和,但结果与bin文件本身显示的checksum不一样,不知道是不是我的checksum算法出现了问题,你可以帮我们分析 下吗?

0 Kudos
3,593 Views
kerryzhou
NXP TechSupport
NXP TechSupport

我下周帮你仔细看看, 你这个checksum是要干什么用的呢?

 

0 Kudos
3,579 Views
harry_liang
Contributor II

Hi, kerryzhou

 

我是打算用来OTA空中升级的,要对image的完整性等进行校验

0 Kudos
3,575 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi harry_liang,

   From the MCUXPresso IDE, the checksum should be used for the LPC product, not the RT product.

image.png

从你上次的checksum报的问题的地方看,结合我之前对LPC产品的支持,这个checksum通常是给LPC用的,有些LPC它的checksum就放在flash的0X1C的偏移地址,用于对于整个image的checksum值。

但是RT产品它是不一样的,他的flash偏移0X1C是要用作其他用处,所以我认为MCUXPresso IDE的checksum不能用于RT芯片。我认为它这么强制添加,会导致FCBC区域数据的破坏。

或许, 你需要生成checksum放在你具体自定义的flash区域,然后你做OTA的时候,再去读取与对比。

Best Regards,

Kerry

3,570 Views
harry_liang
Contributor II

哦哦,原来这样,明白,谢谢你!

0 Kudos
3,565 Views
kerryzhou
NXP TechSupport
NXP TechSupport

不客气,后续有任何技术问题欢迎新建帖子,保持交流!

 

Best Regards,

Kerry

0 Kudos