102 questions
0
votes
2
answers
230
views
Digitwise_addition: exceed limit: if exceeded -> code time out
i am working on a kata.
Digitwise addition is a special kind of addition where instead of adding 1 normally to the number, it adds 1 to every digit of that number. If the digit is a 9, we replace it ...
2
votes
0
answers
38
views
MCUXpresso with MQX 4.2 : Kinetis MK64FN1M0VLQ12
I'm compiling an old Code Warrior v10.6 (Freescale) project with MQX 4.2 in MCUXpressov11.9.1 (NXP). I want to continue to use MQX 4.2 in MCUXpresso. I can't resolve the following error on the MQX ...
0
votes
1
answer
1k
views
How do I use an external library path with C project in Neovim?
I'm using VS Code to write C, which then gets compiled in an old version of CodeWarrior to be used on a microcontroller.
VS Code has an include path section in the config of the C/C++ extension, where ...
1
vote
1
answer
607
views
Read Flash Memory using PEmicro and CodeWarrior IDE (MC9S12XET256 MCU)
I am attempting to read the flash memory of the MC9S12XET256 MCU for inspection and exploration purposes, using the following tools:
CodeWarrior IDE
PEmicro Debugger
Unfortunately, I have been ...
0
votes
2
answers
92
views
How do I account for the spaces in the code?
I am solving this code wars kata problem that requires me to return a string in a weird case such that the first letter is in uppercase and the next is in lowercase and so on.
Here is the link to the ...
2
votes
1
answer
145
views
How should I write my C code to have the resulting assembly use extra dsll32 and dsra32 instructions?
I'm decompiling a PS2 game that was shipped as a debug build. I've gotten as far as decompiling enough to be able compile an ELF file using the compiler that was originally used (Metrowerks ...
0
votes
0
answers
50
views
Where does CodeWarrior keep rsp values? [duplicate]
I am assembly debugging C code in Codewarrior.
It assigns the value I defined with int to a location with rsp.
for example:
//C code //Assembly code
int a = 80; li ...
-3
votes
1
answer
391
views
How to determine offset values when disassembly?
long long int i=57745158985; #the C code
0000000000100004: li r7,13
0000000000100008: lis r8,29153
000000000010000c: ori r8,r8,0x3349
0000000000100010: stw r7,24(rsp)
0000000000100014: stw r8,28(...
1
vote
4
answers
3k
views
TypeError: Cannot read property 'toUpperCase' of undefined |CodeWars|
So, here is the kata:
Complete the method/function so that it converts dash/underscore delimited words into camel casing. The first word within the output should be capitalized only if the original ...
-3
votes
1
answer
90
views
Need to return array of the top-3 most occurring words. (codewars ) [closed]
import re
def find_top_word(top, word_list, word_set):
top_word = ''
top_count = 0
for word in word_set:
counter = 0
for char in word_list:
if word == char:
...
0
votes
1
answer
45
views
Sum of variabels from each for loop iterations
I want to solve this exercise https://www.codewars.com/kata/5648b12ce68d9daa6b000099/train/python
How can I count result of count variable from first and second loop together ?
Result from first loop ...
2
votes
3
answers
1k
views
Food Ranking List Challenge (TestDome)
I get stuck on this challenge so I need help.
A website needs a list where users can rank their favorite foods.
Write the setup function, which should register click handlers on all
Up! and Down! ...
0
votes
3
answers
235
views
Receiving an exit code error on codewars when trying to manipulate a string
Please do not include any spoilers if possible.
I'm working on Kata Exclamation marks series #1: Remove an exclamation mark from the end of string and have been receiving an IndexError: string index ...
0
votes
5
answers
119
views
Why is this code removing `False` from the array?
This is the task:
Write an algorithm that takes an array and moves all of the zeros to the end, preserving the order of the other elements
What is wrong with this code? Why is it not keeping boolean ...
1
vote
6
answers
338
views
Loop is stuck for some reason and then finally returns undefined
This is the problem I am trying to solve:
Given: an array containing hashes of names
Return: a string formatted as a list of names separated by commas except for the last two names, which should be ...
1
vote
0
answers
416
views
What is the code to print text into a new line on assembly code, on HCS12 microcontroller using CodeWarrior?
I need my output to be put in colons on the terminal but they always display in the first row. I need to implement a part of code (which I am trying to find out on YouTube but they are using different ...
0
votes
2
answers
731
views
String incrementer codewars (Ruby) problem
I am working on a string incrementer project on codewars.
Basicly,
Writing a function which increments a string, to create a new string.
If the string already ends with a number, the number should be ...
0
votes
2
answers
401
views
Why does the V flag shown in the addition in assembly language below is set to 1 instead of 0? Why does the overflow occur?
Here is a question on a practice quiz that I did but I do not understand why the V flag is 1.
1
vote
0
answers
106
views
How to get Duktape to run on Mac 68k (like it does on PPC?)
I'm writing a small app that runs on MacOS 7.x - 9.x (using Macintosh Toolbox) and I've decided to include Duktape.
I use CodeWarrior 6.0 running on MacOS 9.
I use the Low Memory configuration, found ...
0
votes
2
answers
73
views
single word input succesfully ase swaped,but not worked for the sentences in problem weird case codewarrior?
Currently i am doing the weird case problem in cordwarrior. the problem is that Write a function toWeirdCase (weirdcase in Ruby) that accepts a string, and returns the same string with all even ...
0
votes
2
answers
599
views
why not pass all test case in problem balanced numbers in codewars?
Currently i am doing a challenge in codewars on Balanced numbers and i wrote the code in dart and it successfully completed 100 test cases but for long numbers it is not working properly...So i think ...
-1
votes
1
answer
206
views
Translate Inline Assembler of Codewarrior to GCC Inline Assembler
I am working on a task to move a big project from old Codewarrior IDE to S32DS from NXP, which use a compiler of GCC 4.9. Unluckily I have big troubles to compile the inline assembley code in S32DS, ...
-4
votes
2
answers
211
views
Global variable is smashed
I have the next code:
#include <math.h>
int x;
float Temp = 0;
void main(){
x = 2;
for(;;){
Temp=log(20);
}
}
I shortened my code to the important line. The problem I have is once x is ...
1
vote
3
answers
2k
views
Which Codewarrior version is needed for HCS08 and HCS12X under Windows 10?
I use Codewarrior
- V4.7 for HCS12X
- V6.3 for HCS08
in Windows XP.
Moving CW to Windows 10 seems impossible.
It won’t install, and dongle licensing does not work.
I have tried to figure ...
0
votes
1
answer
899
views
How to build a CodeWarrior v6.3 Project in command line?
Refer to this documentation, I try to build an old Code Warrior V6.3 Project (.mcp) via command line.
PS C:\Program Files (x86)\Freescale\CodeWarrior for Microcontrollers V6.3\bin> .\cmdide /q /f ...
0
votes
1
answer
73
views
Codewarrior's command-line interface stops waiting for a dialog
I am compiling a CodeWarrior project using cwide.
When the build is successful, everything is OK, but when there are errors, my continuous automation system blocks forever waiting for a click here:
...
0
votes
1
answer
101
views
requirement of mc56f8367 header files
i am new to embedded programming i like to program a bldc motor with mc56f8367 with IDE
CodeWarrior® Development Studio for 56800/E Digital Signal Controllers (Classic IDE) v8.3
but i m unable to ...
0
votes
1
answer
681
views
Javascript Maze Runner on Codewars error
I've working my way through codewars, and I've come across mazerunner (https://www.codewars.com/kata/maze-runner/train/javascript) I've been stumped for about 2 days!
function mazeRunner(maze, ...
0
votes
1
answer
142
views
Can-bus driver of hcs12
Where can I find the following missing functions here in this HCS12 CAN driver?
CANFifo_Init()
CANFifo_Get(msg)
CANFifo_Put(msgPtr)
0
votes
0
answers
80
views
How call a function in C, from an project in assembler language in CodeWarrior?
The project is assembler only, for MC9S08 micro.
The problem is BME280 sensor, I need insert (if possible)
a function in C with compensation formule (ARDUINO)
The project is working and no want to ...
-2
votes
1
answer
79
views
Strightforward parsing json using µC/OS-II
Can anyone help in writing a C parser (using Codewarrior) to parse the following file? I tried many C language json parser, but unfortunately didn't get the idea or they make it difficult.
[
[0,"...
0
votes
1
answer
228
views
Why doesn't the count integer return the expected value of d? as in digit?
I'm working on a coding problem from code-wars and I'm having trouble computing the right answer that it expects from the test values as well as the example tests that they give you!
Here is the ...
0
votes
1
answer
128
views
Codewarrior 10.5 broken links from problems window to errors in code
Typically when I compile a project I am working on in Codewarrior, the Problems window displays the errors and warnings it finds. From there, I am able to click on the errors and I will be linked to ...
1
vote
0
answers
78
views
CRGFLG register, last bit not getting set
I'm using a FreeScale 9S12C micro controller and am coding in Code Warrior. I'm trying to create a SEQ detector for Sequence 10011. When I do a simulation the program gets stuck in the function ...
0
votes
4
answers
781
views
How to create bitfield out of existing variables in C
I am working on a Motorola HCS08 µCU in CodeWarrior V10.6, I am trying to create an extern bitfield which has bits from existing registers. The way the bitfields are created in the µCU header is like
...
0
votes
1
answer
152
views
Can thumb interwork be deactivated on CW 10.6 with ARM toolchain?
I am working on a project with the CodeWarrior for MCU v10.6 IDE. It is an Eclipse based IDE from NXP. The project targets a K21 SoC from NXP (precisely a MK21FN1M0M12, which embeds a cortex-m4, armv7-...
-2
votes
1
answer
158
views
Compiler does not support microcontroller [closed]
I have a basic question. For microcontroller project , we need a compiler which support that specific microcontroller. But if compiler does not support a specific microcontroller then what does it ...
0
votes
0
answers
156
views
How to change references by command line CodeWarrior?
I have downloaded a project from a repository that refers to another project. I'd really like to build this project with Codewarrior 10.4's command line tools. However, the reference path in my ....
1
vote
0
answers
145
views
Coldfire microprocessor MCF5272 USB module stops firing interrrupts
This is a problem that I am trying to solve for years, periodically spending 1-2 months on it.
I am using Metrowerks IDE and ColdFire C compiler MCFCCompiler ver 4.0 to build the embedded code that ...
1
vote
1
answer
113
views
_f_data_rom linker script symbols
I am working on startup code of micro controller 32 bit and codewarrior compiler , As we have to deal with linker script. Certain variables that used in startup code for initilization of RAM and ...
1
vote
2
answers
1k
views
Determine if enough change for tickets in line – 1 test case failed
For this Kata Level 6 problem on CodeWars, 8 out of 9 tests passed. Strange thing: CodeWars wouldn't tell me which test case failed.
Here is my code. Maybe someone on here could help? Thank you so ...
1
vote
0
answers
71
views
How to config a flexray node to send a 16 word payload?
Trying to edit Flexray_UNIFIED_cfg.c in Freescale NCV7383 demo (using CW5.1 and MC9S12XF512) to send bigger packets with different frame IDs to match my automotive target system. Any of youse guys ...
0
votes
1
answer
323
views
CodeWarrior Get variable value from a event.c
to enter context I'm doing this:
Drive a stepper motor through the variation of pulse frequency input to a Driver (A4988) (It is not necessary to know the functioning of this for this question). Now ...
-1
votes
1
answer
629
views
Errors in CodeWarrior: co-processor offset out of range
I'm trying to run a fuzzy inference system (FIS) application on a Freescale Kinetis K70F120M development board using CodeWarrior.
I wrote an Interpreter software that reads two plain text files (one ...
0
votes
1
answer
708
views
Using FreeScale Code Warrior to link GCC object files with __eabi calls in main
I'm linking with FreeScale Code Warrior 5.9 for MPC5554, which is a PPC chip with an e500mc core. I'm compiling with GCC 4.6.4 compiled for powerpc-none-eabi.
I am compiling some C code for my ...
0
votes
1
answer
2k
views
simple for loop and sum
I'm trying to learn HCS12 assembly language but there are no enough examples on the internet. I've tried to write a code but there is no success. I'm stuck. It's not absolutely homework. Can someone ...
1
vote
0
answers
77
views
CodeWarrior to program MCF51QE128 Getting "privilege violation" exceptions writing to flash
I have an application written in C (new to me) in CodeWarrior. The processor is MCF51QE128. I am familiar with assembly language in the old MC6809 (8 bit) processors.
The troublesome code is:
FSTAT=(...
0
votes
1
answer
103
views
Why changes made with processor expert do not apply to my code?
I am facing a problem with Processor Expert in CodeWarrior.
I can't make changes made in peripheral apply to the generated code.
For example, in a code that uses a timer, if I disable the timer, ...
0
votes
2
answers
460
views
Using a void* as an argument inside a function pointer inside a structure definition causes a syntax error
I am creating an interface structure
typedef struct Circular_Buffer_Interface_t * Circular_Buffer_Interface;
typedef struct Circular_Buffer_Interface_t {
U8 (*Put)(Circular_Buffer, void*);
U8 ...
1
vote
0
answers
123
views
How compilation time is affected with coding style (modular programming etc.)?
I have written simple C code of around 4700 lines in freescale codewarrior in two ways. In both the ways number of lines and content are same. The code contains mostly if else loops. Style 1 takes ...