MCU-ZHISHAN-IoT / HML_FwLib_STC89

A lite firmware library for STC micro STC89 series MCU based on SDCC complier | 基於SDCC編譯器實現的針對宏晶微电子(STC Micro)STC89系列單晶片的輕量級固件庫
https://hw.zhishan-iot.tk/page/hml/detail/fwlib_stc89.html
Do What The F*ck You Want To Public License
62 stars 19 forks source link

Can't download hex file to stc chip with stcispV6.8 #1

Closed haozewu closed 6 years ago

haozewu commented 6 years ago

I compile a small example and compile with sdcc.

#include<8052.h>
#define D4 P1_3
unsigned int a;
void main()
{
    while(1)
    {
        a = 51000;
        D4 = 0;
        while(a--);     
        a = 51000;
        D4 = 1;
        while(a--);
   }
}

But after generating hex file with

packihx test.ihx>test.hex

the hex file is

:03000000020006F5
:03005F0002000399
:0300030002006296
:100062007508387509C7C293AE08AF09150874FF41
:10007200B508021509EE4F70EF7508387509C7D239
:1000820093AE08AF09150874FFB508021509EE4FC3
:0400920060CE80EDCF
:06003500E478FFF6D8FD9F
:100013007900E94400601B7A0090009A780175A08A
:1000230000E493F2A308B8000205A0D9F4DAF2754C
:02003300A0FF2C
:10003B007800E84400600A790175A000E4F309D860
:10004B00FC7800E84400600C7900900001E4F0A318
:04005B00D8FCD9FAFA
:0D000600758109120096E582600302000377
:04009600758200224D
:00000001FF

but I can't open it with STC-ISP V6.8. And the hex file is defferent from which I generate with Keil. Do you know why?

haozewu commented 6 years ago

get it.

MCU-ZHISHAN-IoT commented 6 years ago

Congratulations!

大家都是中國人,可以直接用中文回復比較方便哈。Github的Issues還用不習慣,可以透過電郵mcu@zhishan-iot.tk取得及時聯絡!