完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
你好
我尝试制作辅助引导程序。我必须通过CAN将我的代码程序从STM32f103板发送到SPC560P板,并且程序应该由BAM下载到闪存。 我用过收发器。我知道我应该制作user.ld,但你能解释一下我怎么样? 我在ghs中创建了一些standalone_ram.ld,这是我的文件,在BAM模式下运行uC是正确的吗? 记忆{ // 384k内部闪存 flash_rsvd1:ORIGIN = 0x00000000,LENGTH = 8 flash_memory:ORIGIN =。,LENGTH = 384K-8 flash_rsvd2:ORIGIN =。,LENGTH = 0 // 24KB的内部SRAM从0x40000000开始 dram_rsvd1:ORIGIN = 0x40000000,LENGTH = 0 dram_reset:ORIGIN =。,LENGTH = 0 dram_memory:ORIGIN =。,LENGTH = 24K-256 heap_reserve:origin =。,LENGTH = 8K stack_reserve:origin =。,LENGTH = 8K dram_rsvd2:ORIGIN =。,LENGTH = 16} DEFAULTS {stack_reserve = 4K heap_reserve = 4K} // //程序布局用完RAM。 // // SECtiONS { .PPC.EMB.sdata0 ABS:> dram_memory .PPC.EMB.***ss0 CLEAR ABS:> ..text:> dram_memory .vletext:> 。 .syscall:> 。 .rchw NOCHECKSUM:> 。 .secinfo:> 。 .rodata:> 。 .sdata2:> 。 .fixaddr:> 。 .fixtype:> ..sdabase ALIGN(16):> dram_memory .sdata:> 。 .***ss:> 。 .data:> 。 .bss:> 。 .heap ALIGN(16)PAD(heap_reserve):> 。 .stack ALIGN(16)PAD(stack_reserve):> .// //这些特殊符号标记RAM和ROM内存的边界。 //它们由MULTI调试器使用。 // __ghs_ramstart = MEMADDR(dram_rsvd1); __ghs_ramend = MEMENDADDR(dram_memory); __ghs_romstart = MEMADDR(flash_rsvd1); __ghs_romend = MEMENDADDR(flash_rsvd2); _ram_image_heap = ENDADDR(heap_reserve); _ram_image_stack = ENDADDR(stack_reserve); _ram_image_end = ENDADDR(.bss);} 最好的祝福 Mateusz 以上来自于谷歌翻译 以下为原文 Hello I try make a secondary bootloader. I must send my code program from stm32f103 board to SPC560P board via CAN, and program should downlaod by BAM to flash. I used transceivers. I know i should make user.ld, but can you explain me how? I make some standalone_ram.ld in ghs, here is my file, it is correct to ran uC in BAM mode? MEMORY { // 384k Internal Flash flash_rsvd1 : ORIGIN = 0x00000000, LENGTH = 8 flash_memory : ORIGIN = ., LENGTH = 384K-8 flash_rsvd2 : ORIGIN = ., LENGTH = 0 // 24KB of internal SRAM starting at 0x40000000 dram_rsvd1 : ORIGIN = 0x40000000, LENGTH = 0 dram_reset : ORIGIN = ., LENGTH = 0 dram_memory : ORIGIN = ., LENGTH = 24K-256 heap_reserve:origin = ., LENGTH = 8K stack_reserve:origin = ., LENGTH = 8K dram_rsvd2 : ORIGIN = ., LENGTH = 16} DEFAULTS {stack_reserve = 4K heap_reserve = 4K} // // Program layout for running out of RAM. // //SECTIONS { .PPC.EMB.sdata0 ABS : > dram_memory .PPC.EMB.***ss0 CLEAR ABS : > ..text : > dram_memory .vletext : > . .syscall : > . .rchw NOCHECKSUM : > . .secinfo : > . .rodata : > . .sdata2 : > . .fixaddr : > . .fixtype : > ..sdabase ALIGN(16) : > dram_memory .sdata : > . .***ss : > . .data : > . .bss : > . .heap ALIGN(16) PAD(heap_reserve) : > . .stack ALIGN(16) PAD(stack_reserve) : > .// // These special symbols mark the bounds of RAM and ROM memory. // They are used by the MULTI debugger. // __ghs_ramstart = MEMADDR(dram_rsvd1); __ghs_ramend = MEMENDADDR(dram_memory); __ghs_romstart = MEMADDR(flash_rsvd1); __ghs_romend = MEMENDADDR(flash_rsvd2); _ram_image_heap = ENDADDR (heap_reserve); _ram_image_stack = ENDADDR (stack_reserve); _ram_image_end = ENDADDR (.bss);} Best regards Mateusz |
|
相关推荐
10个回答
|
|
|
你好,
我正在开发一个测试应用程序,允许从can获取代码并将其编程为flash。我会尽快回来。 我的想法是运行一个启动加载器,它将通过CAN接收代码,闪存代码到给定的地址,并将启动设置为另一个闪存地址,因此在下次启动时,主板将运行此代码。这符合您的要求吗? 题: 以下是与同一问题相关的请求?: https://community.st.com/0D50X00009XkYZ5SAN 注意:原始帖子包含大量线程对话,只能迁移到第9级 以上来自于谷歌翻译 以下为原文 Hello, I'm working on a test application allowing to get code from can and program it to flash. I will come back asap. My Idea is to run a boot-loader which will receive code via CAN , flash code to a given address and set the boot to another flash address so at next boot , board will run this code. Does this match your requirements? question: is the following request related to the same problem ?: https://community.st.com/0D50X00009XkYZ5SAN Note: the original post contained a large number of threaded conversations and was only able to be migrated to the 9th level |
|
|
|
|
|
是的,听起来不错。我应该使用CAN从STM32F103向SPC560发送二进制代码。而使用BAM的SPC560必须对闪存进行编程。 SPC560板有一个收发器,它接收二进制图像。我将非常感谢你的帮助。
最好的祝福。 Mateusz Raczkowski 以上来自于谷歌翻译 以下为原文 Yes, sounds good. I should sending a binary code from STM32F103 to SPC560 using CAN. And SPC560 using BAM have to program a flash. SPC560 board have a transceiver and it received binary image. I will be grateful for your help. Best regards. Mateusz Raczkowski |
|
|
|
|
|
|
|
|
|
|
|
嗨,
Discovery Pictus的附加申请是SW BAM。 它从CAN总线接收数据(速度300khz),加载到RAM和跳转 这个应用程序使用spc5connect与spc5闪存器进行测试。 您可以从这里开始,在STM32上实现相同的协议,并使用闪存组件修改BAM以在闪存而不是RAM(如果需要)中写入。 请务必使用最新版本的spc5Studio(5.2.3) 问候, Procolo 以上来自于谷歌翻译 以下为原文 Hi, Attached application for Discovery Pictus is a SW BAM. it receives data from CAN bus (speed 300khz) , load to RAM and the jump this app is tested using spc5connect with spc5 flasher. You can start from here, implementing the same protocol on your STM32 and the modify the BAM to write in flash instead of RAM (if needed) using the flash component. Please be sure to use the latest version of spc5Studio (5.2.3) Regards, Procolo |
|
|
|
|
|
非常感谢,我还有一个问题。当我使用CAN总线时,我需要设置密码?
第5.2章中的内容如下: http://www.st.com/content/ccc/resource/technical/document/reference_manual/cf/ad/d5/76/55/1f/49/de/CD00192452.pdf/files/CD00192452.pdf/jcr:内容/翻译/ en.CD00192452.pdf 在这里,我看到密码:0xFEED_FACE_CAFE_BEEF 我可以使用外部应用更改此设置吗? 看待 Mateusz 以上来自于谷歌翻译 以下为原文 Thanks a lot, i have one more question. When i useing CAN bus, i need to set a password? Something like this in chapter 5.2: http://www.st.com/content/ccc/resource/technical/document/reference_manual/cf/ad/d5/76/55/1f/49/de/CD00192452.pdf/files/CD00192452.pdf/jcr:content/translations/en.CD00192452.pdf In here i see password: 0xFEED_FACE_CAFE_BEEF I can change this using external app? Regard Mateusz |
|
|
|
|
|
谢谢,当我使用BAM和CAN时,我应该像这样设置跳线:ABS0 = 0,ABS2 = 1,FAB = 1?
当我编程spc560时,我应该使用引脚CANH和CANL通过CAN接收。我认为对吗? 关心并感谢您的时间 Mateusz 以上来自于谷歌翻译 以下为原文 Thanks, and when i use BAM and CAN i should set jumper like this: ABS0=0, ABS2=1, FAB=1? And when i program spc560 i should receives via CAN using pins CANH and CANL. Do i think right? Regards and thanks for your time Mateusz |
|
|
|
|
|
ABS0 = 01 ABS2 = 0,FAB = 1
看待, Procolo 以上来自于谷歌翻译 以下为原文 ABS0=01 ABS2=0, FAB=1 Regard, Procolo |
|
|
|
|
|
嗨,
让我附上两个申请。 1)它是通过SW模拟的BAM(我已经解决了一些错误)。它还能够从SPCCONNECT接收程序,加载ram并跳转到应用程序 2)它是一个装载机。它能够使用CAN总线将bin文件发送到第一个应用程序。要加载的文件(在此示例中是使用RAM选项中符合LOAD的pictus的串行测试应用程序)是使用名为bin2header的免费工具创建的。它生成一个文件out_bin.h,它应该放在项目的源文件夹中。 我认为这是您的引导加载程序应用程序的一个很好的起点。 Procolo 以上来自于谷歌翻译 以下为原文 Hi, Let me attach two applications. 1) it' s the BAM emulated via SW (i've solved some bugs) . it's also able to receive program from SPCCONNECT, load in ram and jump to the application 2) its a loader . It's able to send a bin file to the first application using CAN bus. the file to load (in this example is the serial test app for pictus complied with LOAD in RAM option ) is created using a free tool called bin2header. it generate a file out_bin.h which should be put in source folder of the project. I think this is a good starting point for your bootloader application. Procolo |
|
|
|
|
|
你好
非常感谢您的帮助和时间。 我使用这个应用程序编程我的SPC5。但我有一个关于主板的问题(使用stm32将代码发送给SPC)。我有一块板STM32F103,我添加了收发器TJA1040。我用C#编写了一个程序,这个程序可以将* .bin文件发送到STM32板。我为STM32制作了一个程序,应该如何使用CAN发送内容。我只在带有收发器的两块STM32f103板上进行测试。在我的工程论文中,我应该做一些类似辅助引导程序的东西。当我编程我的SPC5(使用你的应用程序)我可以收到程序并将其发送给BAM? 在附件中,我添加了我的PC和STM32(谷歌驱动器)的应用程序,也许你可以展示它,你会理解我的意思,因为我有点迷失在这。 它类似于PC-> STM32F103->收发器 - > SPC5板和BAM程序。 对不起我讨厌的问题,但对我来说很难,我无法理解。 https://community.st.com/external-link.jspa?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F0B16SidgttMozS2JwT1p1bXEzMXc%2Fview%3Fusp%3Dsharing https://drive.google.com/file/d/0B16SidgttMozVUY1clVmOThxbk0/view?usp=sharing 最好的问候 Mateusz 以上来自于谷歌翻译 以下为原文 Hello Very thanks for your help and your time. I program my SPC5 using this applications. But I have a question about main board (with stm32 which will send a code to SPC). I have a board STM32F103 and i add transceiver TJA1040. I made a program in C#, this program can send a *.bin file to STM32 board. I made a program for STM32 how should send something using CAN. I test in only in two STM32f103 boards with transceivers. And in my Engineering Thesis i should make a something like secondary bootloader. When i program my SPC5 (using your app) i can receive program and send it to BAM? In attachment i add my application for PC and STM32 (Google drive) maybe you can show it and you will under stand what i mean, becouse I was a little lost in this. Its like PC->STM32F103->transceivers->SPC5 board and BAM program. Sorry for my annoying asking but its hard for me and i cant understand that. https://community.st.com/external-link.jspa?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F0B16SidgttMozS2JwT1p1bXEzMXc%2Fview%3Fusp%3Dsharing https://drive.google.com/file/d/0B16SidgttMozVUY1clVmOThxbk0/view?usp=sharing Best regard Mateusz |
|
|
|
|
|
嗨Procolo,
我测试了你附加的Pictus bootloader演示, 使用第一块P50L5板运行应用程序?SPC560Pxx_RLA CANsend Discovery Application for Discovery?, 第二块P50L5板运行应用程序?SPC560Pxx_SW_BAM ?, 我在测试过程中遇到了问题: 当UDESTK调试器连接到运行软件BAM应用程序的第二块板上的P50L5时,两块板都能正常工作, 第二块板上的P50L5可以跳转到SRAM并连续执行通过CAN总线下载的二进制代码。 但是当UDESTK调试器与第二块板上的P50L5断开连接时,下载的二进制代码无法按需执行, 同时,从第一块板的UART0收到的消息表明了这一点 第二块板上的P50L5通过CAN总线成功接收到新应用的二进制代码。 我找不到这个问题的原因,你在调试附加的Bootloader演示时遇到了同样的问题吗? 软件版本:UDE STK 4.8.2 SPC5Studio 5.5.0 调试工具:用于SPC5xxx的PLS USB / JTAG适配器 谢谢和最好的问候 马文 以上来自于谷歌翻译 以下为原文 Hi Procolo, I tested the Pictus bootloader demo you attached, with the first P50L5 board run the application ?SPC560Pxx_RLA CANsend Test Application for Discovery?, and the second P50L5 board run the application ?SPC560Pxx_SW_BAM?, and I faced a problem during testing: when the UDESTK debugger is connected to P50L5 on the second board which run the application of software BAM, both boards can work normally, the P50L5 on the second board can jump to SRAM and execute the binary code downloaded through CAN Bus successively. but when the UDESTK debugger is disconnected from P50L5 on the second board, the downloaded binary code can not be executed as desired, and at the same time, the message received from UART0 of the first board indicates that P50L5 on the second board has received the binary code of new application successfully through CAN Bus. I can not find the cause of this problem, have you faced the same issue during debugging of the the attached Bootloader demo? version of software: UDE STK 4.8.2 SPC5Studio 5.5.0 debug tools: PLS USB/JTAG Adapter for SPC5xxx Thanks and best regards Marvin |
|
|
|
|
只有小组成员才能发言,加入小组>>
stm32mp157的异核通信的rpmsg_sdb的m4固件和a7驱动该如何编写?
1453 浏览 0 评论
stm32f103用freertos对一个采样率为1kHz的传感器,进行采样,数据出差
1502 浏览 0 评论
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
3649 浏览 1 评论
3842 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
2461 浏览 1 评论
STM32H7打开DCache后,出现了串口接收信息为空的现象,是哪里出了问题?
727浏览 5评论
用NANO STM32F103RBT6的开发板烧录不了是哪里出了问题?
658浏览 5评论
710浏览 5评论
外部中断触发类型为双边沿触发,进入中断回调后有什么办法判断该边沿是上升沿还是下降沿?
940浏览 5评论
STM32L071CBT6低温环境下无法正常工作是什么原因引起的?
745浏览 5评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 20:36 , Processed in 0.799716 second(s), Total 60, Slave 53 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
544