« first day (3561 days earlier)      last day (1370 days later) » 

8:36 AM
@PeterT Laws change, values change, truth does not change with time.
@Mgetz History != truth
History is written by people. You can brainwash people into believing a lie, but lies are not the truth.
 
we don't have any fundamental truth though. Anything like maths that is build up from axioms might be self-coherent, but everything else depends on fundamental particles we don't fully understand yet
 
Have to start calling you Adele
 
 
1 hour later…
9:47 AM
@traducerad Can you convert the ASM to C/C++?
 
user7659542
@Mikhail I have the asm source code
 
user7659542
so yes, maybe to C?
 
user7659542
IDK
 
Its a really challenging thing because its its hard to understand ASM at a glance, but converting to C introduces the problem of testing (I assume the code can't randomly crash :-).
If you need to redo the testing, though, probably converting to C or C++ is the way to go...
 
identifying functions and giving them reasonable names
identifying the calling convention so you can extract the parameters
 
9:57 AM
lol, the calling convention should be a pusha :-)
 
Oh, you're reverse engineering?
 
technically reading asm and making something useful out of it should be on topic there
 
user7659542
@Mikhail also it is for a safety critical device, so I don't know whether asm-C conversion is a good idea. Because you may have to go through a procedure to prove the tool you are using for the conversion is good...
 
I don't mean automatically
 
user7659542
10:03 AM
@Mikhail oh
 
user7659542
I have been thinking about smth intermediary. Wrapping the assembly code with C
 
user7659542
but even then the problem stays the same:
 
user7659542
in assembly some registers are read-only, eg registers showing an interrupt occured
 
user7659542
you now have to be able to set those registers to make your code believe smth happened
 
user7659542
but then... what is the added value of wrapping your code...?
 
10:06 AM
Yeah, so you'd use mspgcc and wrap that black magic crap in inline ASM. The advantage is that the code is possible to understand and potentially less error prone in the future. Could also be more portable, or run faster, etc.
 
user7659542
indeed
 
user7659542
but what about the "mocking" of registers?
 
What?
Do you mean testing? (unit/validation)
 
user7659542
3 mins ago, by traducerad
you now have to be able to set those registers to make your code believe smth happened
 
user7659542
@Mikhail yes for integration and unit testing
 
10:08 AM
yeah, just use inline asm
 
user7659542
how do you create a full software interrupt in assembler?
 
user7659542
You cannot write to the register which tells you an interrupt occured
 
there should be an instruction for that
 
user7659542
@ratchetfreak you think so?
 
user7659542
not sure what type of instruction you are referring to
 
user7659542
10:10 AM
if a register is RO, then you cannot change that AFAIK
 
When I was a kid and used the MSP430, there was a C header that had these functions
 
user7659542
@Mikhail "these functions"= ?
 
can you say which instruction set it is?
 
user7659542
what functions are you thinking about
 
user7659542
@ratchetfreak msp430
 
user7659542
10:11 AM
:p
 
I mean the tutorials on Launchpad had C code setting registers...
#include "msp430F5529.h" //Contains definitions for registers and built-in functions
 
user7659542
@Mikhail yes, that is normal. But a register which is read only will not be settable by your C code
 
Now I'm confused, are you trying to set a read only register :-P
 
user7659542
@Mikhail well I may have to do that
 
user7659542
in order to simulate certain situations
 
user7659542
10:16 AM
for instance: I have not checked yet but it may very well be that the register telling me an IRQ occured is RO
 
user7659542
and I am pretty sure there are more registers which are RO
 
user7659542
So I ll have to find a way to either set those RO registers somehow or find another way around
 
Well, maybe emulate but you could probably just test on actual hardware :-)
 
user7659542
@Mikhail but there lies the issue
 
user7659542
13 hours ago, by traducerad
you'd eventually need an emu/simulator where you can simulate interrupts or other occurences. Typically some registers are set due to an external HW stimulus, but now as you re trying to do pure software tests
 
user7659542
10:18 AM
13 hours ago, by traducerad
you are technically speaking not allowed to apply external HW stimuli. So you need to somehow be able to get those registers set or so to trick the code and make it believe smth happened
 
Your requirements sound unworkable stupid, just get whatever device you need and test on that.
 
user7659542
yes I can run my code on that device but cannot apply external HW stimuli
 
Have you considered applying HW stimuli :-)
 
user7659542
* am not allowed to apply HW stimuli
 
Idk, get some Arduino crap to do it.
 
user7659542
10:20 AM
if you do that you are doing a system test
 
user7659542
not a software test
 
You'd be correct.
 
user7659542
aero industry is strict on such things
 
user7659542
software testing means software testing, not system
 
Yeah, I understand. I guess I'm fortunate that most of the stuff I've made doesn't have strict testing.
 
user7659542
10:23 AM
soooo... need to find a way to simulate stuff
 
emulate
 
user7659542
mkay
 
I assume that one of the things you need to do is exercise the chip in situ to make sure it does the correct things?
but part of that will by necessity be read input and give output
 
Whats the correct solution here? Does the board have some wacky external way to trigger the interrupts?
 
user7659542
@Mikhail idk MSP430 seems quite normal (ie like other systems) in that regard
 
user7659542
10:30 AM
not sure what the optimal solution is here
 
10:51 AM
Yeah, it sounds to me like there is no real way to ensure this thing works without a test rig, but I also have no clue what I'm talking about. Probably you can buy something that simulates it...
0
Q: IAR embedded workbench MSP430 interrupt simulation rejected

DennisI've a question. Does anybody know why my interrupt is rejected when I'm simulating? I simulate the SYSNMI_VECTOR, I've enabled the SVMLIE and SVMHIE bit. But when I look in the interrupt log my interrupts are rejected. As initialization I do this: //Unlock PMM settings PMMCTL0_H=PMMPW_H;...

Okay back to writing my thesis...
 
user7659542
I have 1 month, not 5 years
 
11:19 AM
IAR looks pretty cool, do people actually use it?
 
fuck me, I spend half the day yesterday making the codebase compile on GCC because minGW-ar couldn't deal with llvm bitcode and I just didn't want to get into linker plugin loading
then I realized today I could've just removed the lto flags when compiling with clang to just get normal object files
oh well, most of the fixes were non-compliant code anyway.
 
What's the most commonly used library for linux serial port communication (C or C++). I must have seen many such libraries, but now I need one off the shelf.
 
the c standard library :P and /proc/tty/serial
 
...
 
I meant /dev/ttyS0 , but for the purposes of the joke accuracy wasn't needed
 
11:31 AM
I am sure I can find one with the parsing almost done for me, even on the machine where it's needed.
 
 
7 hours later…
6:30 PM
 
 
2 hours later…
8:29 PM
Cool
 

« first day (3561 days earlier)      last day (1370 days later) »