将编译好的程序上传到C51微控制器

发布于 2024-08-18 07:11:12 字数 301 浏览 7 评论 0原文

我正在尝试将已编译的程序上传到微控制器..我的问题不在于编程或上传东西..我的问题是上传什么 uu

该程序是用C语言编写的,是用SDCC编译的。 MCU是ATMEL公司的AT89S8252。

我按照 MCU 协议构建了一个简单的并行端口编程器,用于串行编程,如其数据表中所述。

到目前为止一切顺利..但是..我应该上传什么到单片机?

编译时,SDCC 生成大量文本报告.. 然后是 .ihx.. 我怀疑我不应该直接上传这个文件,而是以某种方式对其进行后处理以获得要上传的实际原始字节?

任何帮助将不胜感激=)

I'm trying to upload a compiled program to a microcontroller.. well my problem is not in programming or uploading things.. my problem is what to upload u.u

The program is in C and was compiled with SDCC.
The mcu is an AT89S8252 by ATMEL.

I built a simple parallel port programmer following MCU protocols for serial programming as stated in its datasheet.

So far so good.. but.. what shoud I upload to the mcu??

when compiling, SDCC generates a lot of text reports.. and then an .ihx.. I suspect I should not upload this file directly but post-process it in some way to get the actual raw bytes to upload??

any help will be highly appreciated =)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

○闲身 2024-08-25 07:11:12

.ihx 文件是否是 Intel 十六进制格式文件?如果是这样,在让程序员开始工作之前,您不需要做太多的工作。英特尔十六进制格式只是一种专门的文本格式。谷歌英特尔十六进制格式以查找它的样子。例如,维基百科上有一个页面。将其与您的 .ihx 文件进行比较。如果您获得匹配,您应该能够找到一些东西将其转换为原始二进制格式,准备好推送到您的 MCU。如果你不能,你应该能够在一个小时左右写一些东西来完成这项工作,这非常简单。如果您确实遇到困难,我可以通过电子邮件向您发送我之前编写的工具。祝你好运。

Is the .ihx file an Intel hex format file by any chance ? If it is you don't have too much more work to do before you can put your programmer to work. Intel hex format is just a specialized text format. Google Intel hex format to find what it looks like. There's a page on Wikipedia for example. Compare that to your .ihx file. If you get a match you should be able to find something to convert it to a raw binary format, ready to push down to your MCU. If you can't, you should be able to write something to do the job in an hour or so, it's very simple. I could possibly email you a tool I have written previously if you are really stuck. Good luck.

迷荒 2024-08-25 07:11:12

我认为您的 .ihx 文件是一个 Intel 十六进制文件。该格式或类似的 Motorola S-record 格式通常是编程器软件读取的良好格式。这些格式包含要编程的数据以及数据应写入的地址。它比不包含地址信息的二进制文件更有用。

您使用什么软件来驱动并行编程器,它是否接受 Intel 十六进制格式或 Motorola S-record 文件?或者,你的意思是你自己写的?

您可以在文本编辑器中打开英特尔十六进制文件并理解其内容。有许多参考文献解释了该格式。例如维基百科中的Intel HEX

Your .ihx file is an Intel hex file I reckon. That, or the similar Motorola S-record format, is usually a good format for programmer software to read. Those formats contain the data to program, as well as the address that the data should be written to. It is more useful than a binary file, which contains no address information.

What software are you using to drive the parallel programmer, and does it accept Intel hex format or Motorola S-record files? Or, do you mean you're writing your own?

You can open an Intel hex file in a text editor and make some sense of its contents. There are many references that explain the format. E.g. Intel HEX in Wikipedia.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文