HI, I am trying to communicate with a board that has the XC161 step AA and one 8bit external RAM at CS0 for debugging. Until now the success ( :) ) is : in EA and bootstrap, sending a 0x0 the uP answers with A5 which I believe is fine! I have KEIL ULINK but I only get "device can not enter bypass mode. connection to target missing or incorrect." like if it is not connected. I have been trying to understand th OCDS and it seems it must have a monitor!? Does ULINK has all this? That is if connect ULINK and call it on uVision I must get something even if no sw is loaded? I make some measurements and I see TRST changing but nothing on TDO! Also I can not load any monitor on the board. So in conclusion I can not load anything on it. Does anyone has evere worked with XC161 and has any monitor or ULINK experience? If so can anyone explain to me if there is some tricks with it? thanks®ards2all, joao
No. I am trying to understand a bit more of the problem so that I can give further details. I have been made several tests and here is what I have found: 1) I have downloaded 4.16 C166 version and oops lots of errors! "reference made to unresolved external". After a lots of wasting hours I have found that the compiler removes lots of functions - the ones that only have xc161 regs initializations and global vars!!! So take care with the new version! For now I have just tick "use static memory for non register automatics" !!! 2) With the new version and after a lots of hits with my head against the nearest wall, voilá : nothing is different! The same errors again. 3) I have give up of OCDS for now. I am now trying to load a monitor on it with dscope. It gives one error as no connection is on. I know that the uP answers the 0x00 with 0xA5 and I believe that after this the dscope sends the boot code to it(not to RAM). after that nothing happens. Does anyone has ever loaded a monitor to the XC161 step AA? Even if the reset configuration and the RAM are bad dscope should give an error like bad configuration.
Can you provide an example where the compiler removes functions that are needed. We can simply not duplicate this problem.
Two examples: but I have found that any function that just work on uP registers and/or global data is removed from the lst file! 1) static u16_t idata act_mask; // u16_t as unsigned int void adc_init(void) { act_mask = 0; ADC_CTR0_MD = 0; // compatibility mode ADC_CIC = ISR_ILVL(adc_ready_INT_ILVL)+ ISR_GLVL(adc_ready_INT_GLVL)+ ISR_GPX(adc_ready_INT_GPX); // all this macros are equal to a const } 2) sbit tps2041_enable = P2^11; sbit tps2041_flag = P2^12; bool_t tps2041_init(bool_t autoDisable) { // first we must setup the IO lines // make it disable by default tps2041_enable = 1; // 1. alternate function selected ALTSEL0P2_P11 = 0; ALTSEL0P2_P12 = 0; // 2. Open drain mode ODP2_P11 = 1; // 3. Direction control DP2_P11 = 1; // output DP2_P12 = 0; // input // autoDisable => whenever TPS2041 asserts flag // this driver disables TPS2041 so that it can auto restart // this is done by interrupt if (autoDisable) { // Interrupt Configuration -> EX4IN EXICON&=0xFCFF; EXICON|=(ISR_FALLING_EDGE<<8); CC1_CC12IC = ISR_ILVL(tps2041_error_INT_ILVL)+ ISR_GLVL(tps2041_error_INT_GLVL)+ ISR_GPX(tps2041_error_INT_GPX)+0x0040; } return (~tps2041_flag); }
Sorry, still not able to duplicate this issue. Did you define the functions as 'static'? Can you send a small example project that shows this to: support.intl@keil.com
Just sent it. You can contact me on my email if you wish.
I have not got your email so far. Are you sure that you have send it to: support.intl@keil.com?
Yes and no errors on delivering! I have forward it again and I set up "the request delivery receipt." After a short interval: " Your message has been relayed to the following recipient(s): support.intl@keil.com Message relayed The message was successfully delivered to 1 recipient(s) at domain keil.com. "